MS Access: Set the focus on the first field in a form whenever a record is viewed in Access 2003/XP/2000/97

To make sure that the focus is on the first field whenever a new record is added...or for that matter, whenever you view a record in the form, try the following VBA code on the form's "On Current" event:

First_Field.SetFocus


For example, if your first field was called CompanyName, you would use the following VBA code:

Private Sub Form_Current()

CompanyName.SetFocus

End Sub