Tab Control: Moving To The Next Tab

  • Thread starter Thread starter Charles Phillips
  • Start date Start date
C

Charles Phillips

Hello,
I have a db form in MS-Access 97-2000.
The form has three (3) tabs on it. Each tab has 5 - 12 fields.
I can tab to each field. When I get to the last field, I want to tab to the
next tab control.
I downloaded an example (CurrentTab) from Microsoft (MS), but it did not
show me what I needed to know.
The form (example) MS provided, uses a button to get to the next tab. I do
not want to use a button, but to automatically go to the next tab from the
last field, in the previous tab and display a message about the tab being
selected... I have searched several places. Can someone point me to an
example/sample(s)????


Thank you,

Charles L. Phillips
 
Hi Charles,

All you need to do is place in the AfterUpdate event of the last
control of one sheet
me.NameOfNextContol.SetFocus.

Good luck,

Nick
 
Hello,
I tried your process, & I'm getting a different result.
I must be doing something wrong.
Can you point me to an example or some samples???


Thank you,

Charles L. Phillips
 
Charles said:
Hello,
I tried your process, & I'm getting a different result.
I must be doing something wrong.
Can you point me to an example or some samples???


I actually prefer a different approach. If you use the exit or update event
of the last control on a page then that will override the user's wishes if
they navigate with the mouse. In those cases the user probably doesn't want
to go to the next page of the TabControl and you code will force that on
them anyway.

What I do is place a tiny (but Visible = True) TextBox on each TabPage and
make it last in the TabOrder. In its GotFocus event I have code to move
focus to the desired control on the next TabPage.

With this strategy the user is taken to the next TabPage if they leave your
last "real" control by using the Tab or Enter key, but if they click
somewhere else with the mouse then nothing will happen to interfere with
that.
 
Hi Charlse,

What is happening now?

Nick
Charles said:
Hello,
I tried your process, & I'm getting a different result.
I must be doing something wrong.
Can you point me to an example or some samples???


Thank you,

Charles L. Phillips
 
Hello,
I got it figured out.
Sorry for the lonnngggg delay in responding...


Thank you,

Charles L. Phillips
 

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

Back
Top