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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Want cursor to return to first field for another record entry 1

Status
Not open for further replies.

elviajero

MIS
Feb 8, 2001
40
US
I have an add record form, and after clicking on the command button to save the record, the cursor seems to disappear. I would like it to return to the first field in the form ready for another record entry. Anyone have any idea what I could do to make this happen?
 
you need to set the focus to your txtbox you want the cursor to appear. ex. Report_Name is the name of my text box it want the cursor to go to after i click the cmd button

Private Sub cmdNewRecord_Click()
On Error GoTo Err_cmdNewRecord_Click

DoCmd.GoToRecord , , acNewRec
Report_Name.SetFocus
Exit_cmdNewRecord_Click:
Exit Sub

Err_cmdNewRecord_Click:
MsgBox Err.Description
Resume Exit_cmdNewRecord_Click

End Sub


jtayl76@associatescommerce.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top