Tab Order within a Tab Control

G

Guest

I have a form with 6 tabs in a tab control form. My problem is this: With
the cursor positioned on the tab 1 label, I press tab and the cursor moves to
the first field in the tab as designed. I then tab across until I get to the
last field in tab 1. Now, when I tab out of the last field to go to the next
tab label, the cursor moves to a command button set up outside the tab
control box. I press tab again and the next record is displayed (the command
button function), press tab again and it goes to the first field at the top
of the form itself. What I need to be able to do is have the cursor move to
tab 2 when I press the tab button from the last field in tab one. When I get
to the last field in the last tab, that's I when I need it to move to the
next record. By the way, I am not real good with Visual Basic so if I need
to go to the code, please be explicit. Any suggestions/help is greatly
appreciated.
 
M

[MVP] S.Clark

I do one, some, or all of the following"


1. In the last Control of the tab, in the On Exit Event, instruct which
control to goto next:
Controlname.SetFocus

2. Put a Hot Key on each tab label (with the Ampersand.)
&1. Address
&2. Notes
&3. Certifications
I like to put numbers on tabs to guide the user through them, because they
typically have some logical order.

3. Set the Form's Cycle Property to 'Current Record'. This means that you
have to give some alternative method to navigate records, but it prevents
the unwanted record jump.
 
G

Guest

Steve, thanks for the quick response. I understand teh setfocus and got that
to work. Now the next delimma is when I leave that last field and go to the
next record I need the previous record to clear and give me a blank one. The
setfocus is taking me to the right field, its just not clearing it out. I
thought a save command in the macro or a close command would work but didn't.
Do you have any suggestions?

Again Thanks.

David F.
 

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