How to go to Tab #5 on a form

G

Guest

I have a form that has 5 tabs with data from tables and subforms. I am
trying to create a button that executes a macro to go to tab #5. I have used
the macro command GoToPage and put 5 into the page number field in the macro
design screen.

when I run the macro, I get an error that says page #5 doesn't exist on this
form.

I have 6 tabs and have confirmed that my tab 5 indeed is called page 5 in
the tab preferences.

Are tabs not considered pages or what am I missing?
 
G

Guest

Each page has a number in the PageIndex Property, check the number in page 5
and write in the button

me.TabControlName = TheNumber
 
R

Rick Brandt

BLTibbs said:
I have a form that has 5 tabs with data from tables and subforms. I
am trying to create a button that executes a macro to go to tab #5.
I have used the macro command GoToPage and put 5 into the page number
field in the macro design screen.

when I run the macro, I get an error that says page #5 doesn't exist
on this form.

I have 6 tabs and have confirmed that my tab 5 indeed is called page
5 in the tab preferences.

Are tabs not considered pages or what am I missing?

No that is not what Pages is referring to. Just set focus to a control that
is on page 5 of your TabControl.
 
A

Al Camp

Use the GoToControl action, anmd specify the name of the tab.
DoCmd.GoToControl "The TabNAME"
hth
Al Camp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top