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