select tab/page in vb

  • Thread starter Thread starter Zenon
  • Start date Start date
Z

Zenon

I have a form with multiple tabs(pages). on a certain condition, I
want to programatically switch to a different tab(page). I tried
formname.pagename.setfocus and that didn't seem to work. Any
suggestions?

thanks
 
me.controlname.setfocus

if the control you are setting the focus to is on another
page, it will change automatically

Have an awesome day

Warm Regards,
Crystal

MVP Microsoft Access

remote programming and training
strive4peace2006 at yahoo.com
 
Given: a form called frmMain containing a tab control called tabMain whose
first page is called pgName, the following 2 statements are equivalent, and
will display the specified page:

frmMain.tabMain.Pages("pgName").SetFocus
or
frmMain.tabMain.Pages(0).SetFocus


similarly,
Me.tabMain.Pages(Me.tabMain.Value).Name
would return the name of the currently displayed page

HTH,
 
you're welcome ;) happy to help

Warm Regards,
Crystal
MVP Microsoft Access

remote programming and training
strive4peace2006 at yahoo.com
*
Have an awesome day ;)
 
Back
Top