Hi,
I am working with a databse that uses command buttons in a subform to navigate among records. When I click the "next button" it will navigate to the next record until there are no more, which it then creates a new record. After clicking it again, it will say "cannot access specified record" *duh*.
Here is my code for the button just in case:
Private Sub cmdNextAd_Click()
On Error GoTo Err_cmdNextAd_Click
DoCmd.GoToRecord , "", acNext
Exit_cmdNextAd_Click:
Exit Sub
Err_cmdNextAd_Click:
MsgBox Err.Description
Resume Exit_cmdNextAd_Click
End Sub
Ok, how do I fix this?
I am working with a databse that uses command buttons in a subform to navigate among records. When I click the "next button" it will navigate to the next record until there are no more, which it then creates a new record. After clicking it again, it will say "cannot access specified record" *duh*.
Here is my code for the button just in case:
Private Sub cmdNextAd_Click()
On Error GoTo Err_cmdNextAd_Click
DoCmd.GoToRecord , "", acNext
Exit_cmdNextAd_Click:
Exit Sub
Err_cmdNextAd_Click:
MsgBox Err.Description
Resume Exit_cmdNextAd_Click
End Sub
Ok, how do I fix this?