dbTalk Databases Forums  

Select a particular tab/subform in A2010 Navigation control with VBA

comp.databases.ms-access comp.databases.ms-access


Discuss Select a particular tab/subform in A2010 Navigation control with VBA in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
andrewmrichards
 
Posts: n/a

Default Select a particular tab/subform in A2010 Navigation control with VBA - 10-21-2010 , 05:36 PM






Hi all,

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

Reply With Quote
  #2  
Old   
Albert D. Kallal
 
Posts: n/a

Default Re: Select a particular tab/subform in A2010 Navigation control with VBA - 10-22-2010 , 10:23 AM






?"andrewmrichards" wrote in message
news:003294ae-fa4b-43cb-a627-dac54afa8218 (AT) s4g2000yql (DOT) googlegroups.com...

Quote:
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
Pleasenospam_kallal (AT) msn (DOT) com

Reply With Quote
  #3  
Old   
Albert D. Kallal
 
Posts: n/a

Default Re: Select a particular tab/subform in A2010 Navigation control with VBA - 10-22-2010 , 10:38 AM



?"Albert D. Kallal" wrote in message
news:V%hwo.15409$FM2.6652 (AT) newsfe16 (DOT) iad...

(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.

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
Pleasenospam_kallal (AT) msn (DOT) com

Reply With Quote
  #4  
Old   
andrewmrichards
 
Posts: n/a

Default Re: Select a particular tab/subform in A2010 Navigation control with VBA - 10-23-2010 , 10:43 AM



On Oct 22, 4:38*pm, "Albert D. Kallal" <PleaseNOOOsPAMmkal... (AT) msn (DOT) com>
wrote:
Quote:
?"Albert D. Kallal" *wrote in messagenews:V%hwo.15409$FM2.6652 (AT) newsfe16 (DOT) .iad...

(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.

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
Pleasenospam_kal... (AT) msn (DOT) com
Excellent - Thank you so much for that Albert.

Worked like a charm...

Andrew

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.