Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add New Record in Form, then goto first data entry field 2

Status
Not open for further replies.

SMHSleepy

Technical User
Sep 8, 2009
174
CA
Hello, I'm able to add a new record to my form through various different methods; however, it just leaves me with a blank form with no cursor placement. In order to enter data, I have to click on the first box first. Call me lazy, but I would like to have my form ready for data entry as soon as I press the "new record" button. Is there a way to do this? Thanks.
 
Code:
Me!Controlname.Setfocus

Just drop that in after the line that adds a new record.
 
Code:
Private Sub Form_Current()
  If Me.NewRecord Then Me.yourControlName.SetFocus
End Sub
 
Thank you, that was fast! Kudos to this forum...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top