I have code on the onopen event of my form so that if there are no records it gives a message and cancels the open form event. How can I stop it giving me the system message saying the opoen form event was cancelled after my own message?
On Error GoTo TrapErr
DoCmd.OpenForm "frmForm"
ExitHere:
Exit Sub
TrapErr:
If Err.Number = 2501 Then
'Event cancelled
Err.Clear
Resume ExitHere
Else
'Error
End If
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.