Tab Control

R

Russ Rollins

I have forms that use tab controls to group related data. I want to be
able to have the user tab from the last control on the 1st page of the
tab control to the first control on the 2nd page of the tab control
instead of having to click on the tab itself. I know there is a way to
do this, but I haven't been able to find the answer. Please help!
russr
First they ignore you. Then they laugh at you.
Then they fight you. Then you win....Mahatma Gandhi
 
R

Rick Brandt

Russ said:
I have forms that use tab controls to group related data. I want to be
able to have the user tab from the last control on the 1st page of the
tab control to the first control on the 2nd page of the tab control
instead of having to click on the tab itself. I know there is a way to
do this, but I haven't been able to find the answer. Please help!
russr
First they ignore you. Then they laugh at you.
Then they fight you. Then you win....Mahatma Gandhi

Best way IMO is to place a transparent button on each TabPage and make it last
in the TabOrder. In its GotFocus event have a line of code that moves focus to
the desired control on the desired TabPage.

When the user tabs out of your last "real" control they will be taken to the
control you want, but they will still be able to use Shift-Tab or the mouse to
move to another control without your code taking them somewhere they don't want
to go as would happen if you used the Exit or LostFocus events of your last real
control.
 
R

Russ Rollins

Thanks but I tried that (though by using a transparent text box) and
when I tried tabbing through to the 2nd page of the tab control in
form view, I got an error message that said Access couldn't find the
macro (?).
I'm not very strong on coding, could you help by posting the correct
code? Also, why the error message about a missing macro?
Russ

Best way IMO is to place a transparent button on each TabPage and make it last
in the TabOrder. In its GotFocus event have a line of code that moves focus to
the desired control on the desired TabPage.

When the user tabs out of your last "real" control they will be taken to the
control you want, but they will still be able to use Shift-Tab or the mouse to
move to another control without your code taking them somewhere they don't want
to go as would happen if you used the Exit or LostFocus events of your last real
control.

First they ignore you. Then they laugh at you.
Then they fight you. Then you win....Mahatma Gandhi
 
R

Rick Brandt

Russ said:
Thanks but I tried that (though by using a transparent text box) and
when I tried tabbing through to the 2nd page of the tab control in
form view, I got an error message that said Access couldn't find the
macro (?).
I'm not very strong on coding, could you help by posting the correct
code? Also, why the error message about a missing macro?
Russ

That normally suggests that you put the code directly into the EventProperty
box. That works for functions and macros, but not for code. You need to enter
[Event Procedure] in the property box and then press the build button [...] to
the right. That will take you to the code editor window.

Between the start and end lines that Access will place there for you type...

Me.ControlName.SetFocus
 
R

Russ Rollins

That's exactly what I did wrong! Thanks so much for your help.
Hopefully I'll get it right this time.
Russ

Russ said:
Thanks but I tried that (though by using a transparent text box) and
when I tried tabbing through to the 2nd page of the tab control in
form view, I got an error message that said Access couldn't find the
macro (?).
I'm not very strong on coding, could you help by posting the correct
code? Also, why the error message about a missing macro?
Russ

That normally suggests that you put the code directly into the EventProperty
box. That works for functions and macros, but not for code. You need to enter
[Event Procedure] in the property box and then press the build button [...] to
the right. That will take you to the code editor window.

Between the start and end lines that Access will place there for you type...

Me.ControlName.SetFocus

First they ignore you. Then they laugh at you.
Then they fight you. Then you win....Mahatma Gandhi
 

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