Have tab automatically appear at the first field in a form

J

jsccorps

I have the Tab Order set so that it should occur at the first field in the
form. However, when I use "Add new record" or "Save" command buttons the tab
is not shown. I have to use the mouse and click on the first field.

What's the problem?
 
D

Dirk Goldgar

jsccorps said:
I have the Tab Order set so that it should occur at the first field
in the form. However, when I use "Add new record" or "Save" command
buttons the tab is not shown. I have to use the mouse and click on
the first field.

What's the problem?

If the focus is on a particular control and you move the form to a new
record, the focus will stay on the control it was in. Is that the
behavior you're talking about? You can put code in the form's Current
event to set the focus to a particular control every time a new record
becomes Current. For example:

Private Sub Form_Current()

Me!NameOfFirstControl.SetFocus

End Sub
 
J

jsccorps

thanks. worked great!

jsccorps

Dirk Goldgar said:
If the focus is on a particular control and you move the form to a new
record, the focus will stay on the control it was in. Is that the
behavior you're talking about? You can put code in the form's Current
event to set the focus to a particular control every time a new record
becomes Current. For example:

Private Sub Form_Current()

Me!NameOfFirstControl.SetFocus

End Sub

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
Top