I am using the following code to open a form
Private Sub License_Certificate_Click()
DoCmd.OpenForm ("edit records")
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