I have a form that by defaults opens so the user can enter a new record. The form also has buttons to flip through the records. After the form us opened and the user enters the new record both the next and previous buttons trigger error #2105. I get why the next button triggers this error. However I don't understand why the previous button does. The code below is on the on click event of the previous button.
Private Sub Previous_Invoice_Click()
On Error GoTo Err_Handler
DoCmd.GoToRecord , , acPrevious
Exit Sub
Err_Handler:
If Err.Number = 2105 Then
MsgBox "You do not have the ability to navigate to the specified record", vbInformation
Else
MsgBox Err.Description, vbExclamation, "Error #: " & Err.Number
End If
Exit Sub
End Sub
Any suggestions would be appreciated.
Thanks