Select Navigation control Tab programmatically
Hi Team,
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?
Regarding why we have same targetFormName: We use one form but dynamic SQL depend on the tab so keep reduce having x number of same forms for different states.
Is there any way we could maybe do something like this.
NavigationControl.SelectedTab = TabIndex?
Many thanks
Krish
