Hi All,
I've made a bare basic Access db. I have also added some records navigation buttons for it. The thing is, when if I am on the very first record or the last record, and I press previous or next buttons, I get the Run Time Error 2105.
c002.JPG
Is there a code that I could use so that when I press next or previous on the last and first entries that Access would show no further records exists.
--- or ---
Is there an IF or other code that when that I press the next button on the last record, it loops back to the first record and vice versa.
Here's my next and previous button codes.
Private Sub cmdNewRecord_Click()
DoCmd.GoToRecord , , acNewRec
End Sub
Private Sub cmdNextRecord_Click()
DoCmd.GoToRecord , , acNext
End Sub
Private Sub cmdPreviousRecord_Click()
DoCmd.GoToRecord , , acPrevious
End Sub
P.S. I'm really rusty with vba, basic codes would be of big help.