Currently we use this command to switch to a tab in a NavigationControl
DoCmd.BrowseTo acBrowseToForm, TabToOpen, Me.name & ".NavigationSubform"
This works fine if there is a unique NavigationTargetName for the selected Tab/Button. If we have two or more Tabs with the same target form name, we are unable to open a specific Tab. -The first tab with the matching targetName is opened-.
I.e. TabA and TabC has the same targetFormName X
if we use the following command
DoCmd.BrowseTo acBrowseToForm, X, Me.name & ".NavigationSubform"
TabA is activated.
Problem: How do we activate TabC?
we've tried to do NavigationForm.TabC.SetFocus &
NavigationForm.navBarTop.Tabs(9).SetFocus
with no luck.
The.SelectedTab property is read only.
Regarding why we have same targetFormName: We use one form but dynamic SQL depends on the selected tab to reduce having x number of same forms for different state of data.
Many thanks
[vba]from the correct[access-vba]as this question bears no relevance outside a Microsoft Access environment. You (and user braX) have done so for many questions, new, old, even very old, thereby destroying both the history (recent activity) as well as the search options. I believe you expect some positive effect of this massive retagging but, trust me, the effects are negative, not even neutral. Thus, I kindly encourage you to please refrain from this in the future. - Gustav[access-vba]should be deprecated like[excel-vba]is. But that is not the case. - Gustav