Hey guys
I have a form with textboxes retrieving data from a query.
On the form I also have 2 buttons. One takes the user to the next record and the other takes the user to the previous record.
The problem arises when the user reaches the end of the record set...basically runs out of records. I am getting the message
and another message saying the error number 2950.
What I have attempted is in the Before update property of the form I have entered the below code:
Unfortunately my coding isnt stopping the error from appearing.....
Can anybody guess why? or have any suggestions to how to stop this occurring?
I look forward to your responses
George
I have a form with textboxes retrieving data from a query.
On the form I also have 2 buttons. One takes the user to the next record and the other takes the user to the previous record.
The problem arises when the user reaches the end of the record set...basically runs out of records. I am getting the message
You may have reached the end of your recordset
and another message saying the error number 2950.
What I have attempted is in the Before update property of the form I have entered the below code:
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo Form_BeforeUpdate_Error
Form_BeforeUpdate_Error:
If Err.Number = 2950 Then
MsgBox("You have reached the last record")
End If
End Sub
Unfortunately my coding isnt stopping the error from appearing.....
Can anybody guess why? or have any suggestions to how to stop this occurring?
I look forward to your responses
George