Hi
Sorry, complete beginner here.
I've created a set of my own nav buttons and they work with one exception.
I am trying to stop the error messages when I am at the first record and click on previous or on my last record and click on next. I searched the forums and found a relevent article, copied the code as it suggested and pasted it as shown. However, the event doesn't proceed. The code it doesn't like is highlighted.
Private Sub Command27_Click()
DoCmd.GoToRecord , , acFirst
Else If (RecordsetClone.RecordCount) = 0
cmdPrevious.Enabled = False
cmdfirst.Enabled = False
cmdNext.Enabled = False
cmdlast.Enabled = False
End Sub
I have DoCmd.GoToRecord , , for first, next, previous and last buttons too.
Please help
Thanks in advance
Note - I did post this previously on Forms forum, incorrectly.
Sorry, complete beginner here.
I've created a set of my own nav buttons and they work with one exception.
I am trying to stop the error messages when I am at the first record and click on previous or on my last record and click on next. I searched the forums and found a relevent article, copied the code as it suggested and pasted it as shown. However, the event doesn't proceed. The code it doesn't like is highlighted.
Private Sub Command27_Click()
DoCmd.GoToRecord , , acFirst
Else If (RecordsetClone.RecordCount) = 0
cmdPrevious.Enabled = False
cmdfirst.Enabled = False
cmdNext.Enabled = False
cmdlast.Enabled = False
End Sub
I have DoCmd.GoToRecord , , for first, next, previous and last buttons too.
Please help
Thanks in advance
Note - I did post this previously on Forms forum, incorrectly.