R
Rob Drummond, Jr
I used a macro to create next record and previous record buttons. When I
reach the last record, a blank form for a new record is loaded then I get the
default message for a macro error and when the first record (for the previous
button) is reached, I get the default message for a macro error. What I
would like is for Next to simply stop and say last record and previous to
stop and no more records. Here is the script for my next record button....
Private Sub RecordNextBtn_Click()
On Error GoTo Err_RecordNextBtn_Click
Dim stDocName As String
stDocName = "RecordNextMcr"
DoCmd.RunMacro stDocName
Exit_RecordNextBtn_Click:
Exit Sub
Err_RecordNextBtn_Click:
MsgBox Err.Description
Resume Exit_RecordNextBtn_Click
End Sub
Any suggestions on how to edit this to NOT create a new record and simply
say no more records (or something similar)?
reach the last record, a blank form for a new record is loaded then I get the
default message for a macro error and when the first record (for the previous
button) is reached, I get the default message for a macro error. What I
would like is for Next to simply stop and say last record and previous to
stop and no more records. Here is the script for my next record button....
Private Sub RecordNextBtn_Click()
On Error GoTo Err_RecordNextBtn_Click
Dim stDocName As String
stDocName = "RecordNextMcr"
DoCmd.RunMacro stDocName
Exit_RecordNextBtn_Click:
Exit Sub
Err_RecordNextBtn_Click:
MsgBox Err.Description
Resume Exit_RecordNextBtn_Click
End Sub
Any suggestions on how to edit this to NOT create a new record and simply
say no more records (or something similar)?