In my booking system I have buttons that move to the next, previous, first and last record. but wen i click next and when its the end of the record set, it says theres a problem.
can you help me write a peice of code for which an error message appears and then loops.
my current code is:
'This goes to the next record
Private Sub cmdNext_Click()
DoCmd.RunCommand acCmdRecordsGoToNext
End Sub
'This goes to the previous code
Private Sub cmdPrevious_Click()
DoCmd.RunCommand acCmdRecordsGoToPrevious
End Sub
I was thinking something like this might work but it didn't:
Call displayCurrentRecord
Else
MsgBox "End of record set - no more records "
rstFilmDetails.MoveLast
End If
Loop +1
appreciate it if you could help, thanks
can you help me write a peice of code for which an error message appears and then loops.
my current code is:
'This goes to the next record
Private Sub cmdNext_Click()
DoCmd.RunCommand acCmdRecordsGoToNext
End Sub
'This goes to the previous code
Private Sub cmdPrevious_Click()
DoCmd.RunCommand acCmdRecordsGoToPrevious
End Sub
I was thinking something like this might work but it didn't:
Call displayCurrentRecord
Else
MsgBox "End of record set - no more records "
rstFilmDetails.MoveLast
End If
Loop +1
appreciate it if you could help, thanks