Tab order for form w/tab controls

cwash

Registered User.
Local time
Today, 23:08
Joined
May 21, 2002
Messages
21
Can someone tell me how to set the tab order to a form that has several 'tab controls'. The tab control has several pages. What I want the tab order to do is continueing tabing the pages.

Right now I'm only able to set the tab order for only the first page. As I continue tabing, I go to the next record.

I want to be able to tab all the fields and 'pages' within a form.

TIA
 
Thanks for the reply. This is the answer I'm looking for but...I'm not very good at coding. Do you think I can get help on where to put this code.

I have eight tabs, (pages). Do they all require a unique name to be listed in the code.

Where does the code go? In the form properties or in each of the page properties?

Thanks for the help.
 
As Former demonstrated in the other thread:
Code:
Private Sub THISCONTROL_KeyDown(KeyCode As Integer, Shift As Integer)
   If KeyCode = 9 Then
      Me.THATCONTROL.SetFocus
   End If
End Sub

Where THISCONTROL is the name of the last control on this tab of the form, and THATCONTROL is the name of the first control on the next tab. What you do is go to the last control in a tab, click on Properties, go to the Events tab, scroll down to the bottom. Click on KeyPress and click the [...] box at the end of the line. Go into Code Builder and fill in the Private Sub...End Sub with what you see above, adjusting the field names accordingly. Go to the next tab and do the same thing for the last tab there. On the very last tab you might have to use something like DoCmd.GoToRecord acNextRecord, instead of using SetFocus, to get it to jump to the next record. I don't use tabbed forms so I don't know how they act when you get to the end. Try it and see, and make lots of backups as you go!

David R
 

Users who are viewing this thread

Back
Top Bottom