By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,471 Members | 2,264 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,471 IT Pros & Developers. It's quick & easy.

I'm having trouble finding HELP section on Tab controls

P: n/a
MLH
I can't seem to find an A97 HELP blurb telling me how to
make a specific Tab Page active from within VBA. I have
a form with 3 tabs. They work great. I want to optionally
make the first, second or third page active with a VBA
command - displaying the controls, of course, on the
desired page.
Apr 14 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Pages in a tabcontrol are sequentially numbered starting with 0. To go to
the second tab, use the expression:
Me!NameOfTabcontrol.Value = 1
third tab:
Me!NameOfTabcontrol.Value = 2
etc.

--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
Over 1175 users have come to me from the newsgroups requesting help
re******@pcdatasheet.com
"MLH" <CR**@NorthState.net> wrote in message
news:3r********************************@4ax.com...
I can't seem to find an A97 HELP blurb telling me how to
make a specific Tab Page active from within VBA. I have
a form with 3 tabs. They work great. I want to optionally
make the first, second or third page active with a VBA
command - displaying the controls, of course, on the
desired page.

Apr 14 '06 #2

P: n/a

"MLH" <CR**@NorthState.net> wrote in message
news:3r********************************@4ax.com...
I can't seem to find an A97 HELP blurb telling me how to
make a specific Tab Page active from within VBA. I have
a form with 3 tabs. They work great. I want to optionally
make the first, second or third page active with a VBA
command - displaying the controls, of course, on the
desired page.


If you're opening up the form with that has the tab control form another
form the syntax is
Forms!NameOfForm!NameOfPage.SetFocus

By default every page created on a tab control is "page1", "page2" etc. Make
sure you name the page correctly first.

Jeff
Apr 14 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.