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

How can I clear the fields in a form when navigating to new form?

Status
Not open for further replies.
Nov 8, 2002
9
US
I have a form frmInvoice. After entering all of the info in the form and printing it I need to move on to another blank form. When I go to the next form (with the little arrow for navigating) all of my previous info is still there. I would like to use a command button to go to the next record, but the little wizard created one that won't work! Does anybody have a suggestion? Thanks in advance!
 
Here's code to go to the next record:

Private Sub cmdGoToNextRecord_Click()
On Error GoTo Err_cmdGoToNextRecord_Click


DoCmd.GoToRecord , , acNext

Exit_cmdGoToNextRecord_Click:
Exit Sub

Err_cmdGoToNextRecord_Click:
MsgBox Err.Description
Resume Exit_cmdGoToNextRecord_Click

End Sub

You can use the same code to go to a "new" record. Just replace "acNext" with "acNewRecord"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top