I have a form with buttons that scroll to Next and Previous record. When you get to the last record and click the next button an Access message appears stating " You can't go to the specified record" I want to do one of to things. Either change the message that Access displays to "There are no more questions papers to view" or disable the next button when on the last record. I have tried a piece of code to disable the "Next record" control when the record is null:
If IsNull(Me.QuestionPaperID) Then
Me.NextRecordButton.Enable = False
Else: NextRecordButton.Enable = True
End If
But I get an error stating that I cannot disable a control when it has the focus. Can anyone help with this one.
If IsNull(Me.QuestionPaperID) Then
Me.NextRecordButton.Enable = False
Else: NextRecordButton.Enable = True
End If
But I get an error stating that I cannot disable a control when it has the focus. Can anyone help with this one.