G
Guest
Hi. I have reports that allow for user input (such as a date) and then run
the report using the preview command. If the user begins to run the report,
but then decides not to run it and closes the parameter window, I get an
error message:
Runtime error 2501: the OpenReport action was canceled.
Similarly, I have mail labels that not only call an imput parameter, but
also open a form to allow the user to choose label size. If this "font" form
is closed prior to completing the entire report run, I get an error:
Runtime error 2450: can't find the form "font"...
Private Sub cmdPreview_Click()
DoCmd.OpenReport Report_Name, acPreview
End Sub
and
Private Sub Report_Open(Cancel As Integer)
....
DoCmd.OpenForm "Font", , , , , acDialog
....
Is there a way to make it look seamless to the user so that the parameter
form/"font" form and report closes without an error notification? Thanks for
your help!
the report using the preview command. If the user begins to run the report,
but then decides not to run it and closes the parameter window, I get an
error message:
Runtime error 2501: the OpenReport action was canceled.
Similarly, I have mail labels that not only call an imput parameter, but
also open a form to allow the user to choose label size. If this "font" form
is closed prior to completing the entire report run, I get an error:
Runtime error 2450: can't find the form "font"...
Private Sub cmdPreview_Click()
DoCmd.OpenReport Report_Name, acPreview
End Sub
and
Private Sub Report_Open(Cancel As Integer)
....
DoCmd.OpenForm "Font", , , , , acDialog
....
Is there a way to make it look seamless to the user so that the parameter
form/"font" form and report closes without an error notification? Thanks for
your help!