I am working on a form and I have a next button and a previous button as well as a Add new Record button. When they hit next... I have it set up so that it will run a procedure which asks the users if they have made changes to the record, if they say YES, then it opens another form with additional information to fill out. If they say NO, I just want it to go to the next record. It will do this, BUT if there is no NEXT record, and they are already at the last record it is just trying to enter a new record. I need it to have this type of code... but do I try to put this in the procedure or try to direct myself back to the NEXT click code? How do I get it to know when it is an error?
DoCmd.GoToRecord , , acNext
Exit_next_Click:
Exit Sub
Err_next_Click:
MsgBox "You are already at the last record."
THANKS.
DoCmd.GoToRecord , , acNext
Exit_next_Click:
Exit Sub
Err_next_Click:
MsgBox "You are already at the last record."
THANKS.