Go to New Record

C

chas

Hi Emmy,

here is the code created when adding a command button to
go to the next record by using the wizard. It uses basic
error trapping to leave the routine if an error occurs.

Private Sub Command22_Click()
On Error GoTo Err_Command22_Click

DoCmd.GoToRecord , , acNext

Exit_Command22_Click:
Exit Sub

Err_Command22_Click:
MsgBox Err.Description
Resume Exit_Command22_Click

End Sub

hth

chas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top