Hello,
I'm running into a problem when I pull up a report to print. I want to view it first and then have the option to print the report. This is the code I am using right now.
I would like to see the report first and then have the option to print, and if I do hit the cancel button, is there a way to avoid the error popping up and just stay on the report view?
I'm running into a problem when I pull up a report to print. I want to view it first and then have the option to print the report. This is the code I am using right now.
DoCmd.OpenReport "Thu_Reporting_Form", acViewPreview
DoCmd.RunCommand acCmdPrint
DoCmd.Close acReport, "Thu_Reporting_Form"
This does pull up the report but it is blank and the print options box is in the middle of the screen. In order for me to see the report, I have to print it first. If I hit cancel it gives me a "Runtime error 2501" the RunComand action was canceled. DoCmd.RunCommand acCmdPrint
DoCmd.Close acReport, "Thu_Reporting_Form"
I would like to see the report first and then have the option to print, and if I do hit the cancel button, is there a way to avoid the error popping up and just stay on the report view?