Sheils
asked on
Stop debug when a docmd operation is cancelled
I am using the following code to open a form
Private Sub License_Certificate_Click( )
DoCmd.OpenForm ("edit records")
End Sub
The record source for the form is a query which asks for the license number before opening. Everything works fine except for when you forget the license number and click cancel on the message box. This gives an error and opens the dedugging dialog box.
How do I stop the code from activating dedug when someone press cancel on the message box
Private Sub License_Certificate_Click(
DoCmd.OpenForm ("edit records")
End Sub
The record source for the form is a query which asks for the license number before opening. Everything works fine except for when you forget the license number and click cancel on the message box. This gives an error and opens the dedugging dialog box.
How do I stop the code from activating dedug when someone press cancel on the message box
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER