Can't go to specified record..

Amy35

Registered User.
Local time
Today, 13:08
Joined
Mar 12, 2002
Messages
53
I have 4 navigation buttons (first, last, next and previous). I used the wizards to create them. Here's the code for the next button:

Private Sub cmdNext_Click()
On Error GoTo Err_cmdNext_Click

DoCmd.GoToRecord , , acNext

Exit_cmdNext_Click:
Exit Sub

Err_cmdNext_Click:
MsgBox Err.Description
Resume Exit_cmdNext_Click

End Sub

I found some code that grayed out the next button set focus to the previous button when the last record was hit. Obviously I couldn't get it to work on my form!

What can I put in this code and then modify for the previous button as well that will get rid of that "can't go to specified record" message?

Thanks for your help...

Amy
 

Users who are viewing this thread

Back
Top Bottom