Connecting Tech Pros Worldwide Help | Site Map

I'm having trouble finding HELP section on Tab controls

MLH
Guest
 
Posts: n/a
#1: Apr 14 '06
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.
PC D
Guest
 
Posts: n/a
#2: Apr 14 '06

re: I'm having trouble finding HELP section on Tab controls


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
resource@pcdatasheet.com


"MLH" <CRCI@NorthState.net> wrote in message
news:3rmv32h22639ucdfjkkag8mm1hkt58tou0@4ax.com...[color=blue]
>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.[/color]


Jeff Smith
Guest
 
Posts: n/a
#3: Apr 14 '06

re: I'm having trouble finding HELP section on Tab controls



"MLH" <CRCI@NorthState.net> wrote in message
news:3rmv32h22639ucdfjkkag8mm1hkt58tou0@4ax.com...[color=blue]
>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.[/color]

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


Closed Thread