View Full Version : Tabbed Forms.


EndersG
11-13-2000, 06:25 AM
I have a tabbed form with 4 different tabs (or pages). Is there a way I can cycle through all the fields of the form using the tab button. For example, when I reach the last field on pg 1 and press "tab", I want to give the first field in pg2 the focus. And so on until the last records in pg 4. Can anyone help? Thanks.

Former
11-13-2000, 07:07 AM
You'll need to put some code on the OnExit event of the last control on each tab, so that when the OnExit event is fired the first control on the next tab is given focus.
Do you want the code ?

EndersG
11-13-2000, 08:58 AM
I would sure appreciate the code if you have it. Thanks.

Former
11-14-2000, 01:07 AM
Actually trap on the key down event...

Private Sub myTextBox_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 9 Then
Me.myOtherTextBox.SetFocus
End If
End Sub

This traps for the Tab key being pressed and sets focus somewhere else once it is.
I hope this helps.

EndersG
11-14-2000, 05:11 AM
Tried it.
It worked like a charm.
You da man! (or girl! if your a woman).

Jamie H
11-14-2000, 05:26 AM
I wish FORMER would help me - he seems well clued up!
I have a dilema with combo boxes which is near your e-mail!!!!!

I AM SO FRUSTRATED!!!!!!!!!!!