Look at GoToRecord in VBA help.
Me.YourControlName.SetFocus
Also, the field that would normally receive focus first would be the first one in the tab order. You generally don't need code to go there first. You can certainly force the issue with SetFocus.
.......
[/INDENT]If I want to add the field called "Last Name", what should my code look like? (I'm confused because of the space between the two words)
........
There's a neat little learning experience for you; Don't use spaces and other special characters in filed or object names. Stick with alpha numeric characters and the under score "_". Try names like FRM_FormName etc.
Given that you have used a space try enclosing the filed name in square brackets [Last Name]
Have you just re-named the control on the form or have you gone back and renamed the field in the Table?
If you have simply renamed the field on the form, you will need to go back and re-name the field in the table.
OK ensure that you are referring to the correct control name. With the form in design view click on the control, now click on the Other tab of the properties box, the first field is Name, this will tell you the name that Access is using to refer to that control. If you have bound an unbound control to that Table field then the Name will be something like Text2 or something similar.
You have got a Docmd command in Option Compare Database section of the VBA windowI'm not sure what it's doing there but if you remove it the On Current event will work.
It only works for me because I have my cursor in the LastName field (and the field is highlighted when you open it). If I click on another field (like email), and hit the "Submit" button or the new record icon, it goes to the next record but the same field (email)....Works for me![]()
No the cursor is set back at Last name.