Error on cancel

dullster

Member
Local time
Today, 12:50
Joined
Mar 10, 2025
Messages
213
I have reports that are triggered off parameters. When the first parameter request comes up, if i cancel, I get "The OpenReport operation was canceled". How do i get it to cancel without the error?

This is my code

Private Sub btnPrintChecks_Click()
DoCmd.OpenReport "rptChkWrite", acViewPreview
End Sub
 
That is not an error, merely an informative message.
 
I never use popup input parameters in queries. I prefer VBA to build filter criteria and apply to form or report. Get user input on form and validate before even attempting to open.

If I did need a dynamic parameter in query, I would reference a form control for input and still validate.

However, error handler tested and works.
 
Last edited:
I understand. This is an old Database originally design in a Dos Program. This is enter Parameters for check printing. It asks for the Start of the CheckNr and the Last CheckNr. It is when it asks for the first CheckNr and it is canceled instead of enter the CheckNr that it would through the message.
 
What DOS program? Why does your code look like VBA?
 
That PDF doesn't provide any new info and hardly addresses my questions.
 

Users who are viewing this thread

Back
Top Bottom