Maybe I'm being dense, but having designed an interface which uses the
Access 2010 Navigation Control, I cannot find a way through VBA of
saying "Activate the third tab" or whatever.
So, how do I programmatically replicate the user action of clicking a
tab and thus changing the displayed subform?
I can set the NavigationForm object's SourceObject property, but this
doesn't affect which tab is shown as selected, and I'm guessing I
don't need to be manually setting colours to imply that the selected
tab has changed?!!
Thanks for your help.
Andrew
>So, how do I programmatically replicate the user action of clicking a
>tab and thus changing the displayed subform?
DoCmd.BrowseTo acBrowseToForm, "Form3", "Navigation
Form.NavigationSubForm"
Form3 is the name of the sub-form you want to make active. If the sub-form
exists, then the active tab in the navigation control will change.
If the sub-form does not exist, then the current active one is REPLACED with
what you specify in the above.
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
Pleasenos...@msn.com
(If the sub-form does not exist, then the current active one is REPLACED
with
what you specify in the above.)
Sorry, the above should read:
if the sub-form (form or report name you want to display) is NOT in the
current list of navigation buttons, then the current active navigation
control is replaced with what you specify in the above.
So, of course the form has to exist, but I meant to say exists as an
legitimate choice in the current set of buttons you have in the navigation
control.
So, in any case where the form you specify with browse to exists, then the
corresponding button does become active and highlighted.
Excellent - Thank you so much for that Albert.
Worked like a charm...
Andrew