How to set the default field on a form

  • Thread starter Thread starter Rob Drummond, Jr
  • Start date Start date
R

Rob Drummond, Jr

I am creating a data entry form. I would like to have the cursor
automatically appear in the first field on the form when the "New Record"
button is clicked. How do a set a field as the default or tell the
form/database where to put the cursor when a new record is being created?
 
I am creating a data entry form. I would like to have the cursor
automatically appear in the first field on the form when the "New Record"
button is clicked. How do a set a field as the default or tell the
form/database where to put the cursor when a new record is being created?


1 Code the Form's Current event:
Me.[TheControlName].SetFocus

This will set focus to that control each time you navigate to another
record.

2) If you ONLY wish to do this for a new record entry, then code the
Current event:
If Me.NewRecord Then
Me.TheControlName.SetFocus
End If
 
Back
Top