View Full Version : Page select on form through VBA


nickolm
12-30-2008, 08:57 AM
Hello,

Can someone PLEASE tell me how to get vba to change from one page tab to another once an event has happened in the code (during an if statement). Want to move from Children tab to Completed tab. Thanks

Matthew:confused:

lagbolt
12-30-2008, 10:14 AM
Set the .Value property of the tab control.
Also, to write code that won't break if you re-order pages, use something like this...
me.tab.value = me.tab.pages("pgChildren").pageindex
...to switch to the children page.

nickolm
12-30-2008, 11:22 AM
Sorry,

Being very dim today. Can't set the .Value property of the tab control. Not very good with access. Can you help?

Thanks

Matthew:confused:

HiTechCoach
12-30-2008, 12:04 PM
I normally use this:


Me.tabControl.Pages(2).SetFocus

Note the pages numbering starts with 0. So 2 => the third page.

or

Me.tabControl.Pages("Page Name").SetFocus