Hi:
I can't leave this alone!
This WILL work (without a button) to allow the user to continue from page to page of the tab control without leaving the keyboard:
Assume:
the last
control on Page 1 is named "txtLast1".
the first
control on Page 2 is named "txtFirst2". etc.
In the "On Exit" event for txtLast1, enter the following:
Code:
Private Sub txtLast1_Exit(Cancel As Integer)
On Error GoTo txtLast1_Exit_Err
DoCmd.GoToControl "txtFirst2"
txtLast1_Exit_Exit:
Exit Sub
txtLast1_Exit_Err:
MsgBox Error$
Resume txtLast1_Exit_Exit
End Sub
When the focus is on the control "txtLast1", when the user touches either the tab key or the enter key, the focus will move to "txtFirst2", on Page 2 of the tab control. If the user needs to go back to another control on Page 1, the mouse would have to be used, I think.
You would then have to put similar code in the On Exit event of the last control of each page of the tab control;
of course, inserting the appropriate control names to link each page with the next.
Not what you asked for (no button), but it will flow.
If you wished, I could attach to an email the (very small) database that I thoroughly tested this with.
Gus Brunston
![[glasses] [glasses] [glasses]](/data/assets/smilies/glasses.gif)
An old PICKer, using Access2000.