Go to next record problem at last record

Wayne Cramer

Registered User.
Local time
Yesterday, 21:51
Joined
Aug 10, 2007
Messages
93
I have a database form that uses a check box. The following code is used to go to the next recod upon clicking the check box.
DoCmd.GoToRecord , , acNext
The problem comes when the check box is clicked at the last record I get a run time error 2105 "You can't go to the specified record". There must be some code that returns to the first record in this instance.
 
You could simply check for that error number and cancel the event... I suspect there may be a better way to do this...

:)
ken
 

Users who are viewing this thread

Back
Top Bottom