Hi I'm using the following piece of code to automatically print to pdf 4 different reports in an Access DB (2021)
This is working perfectly for 2 of the reports but not for the other 2. These reports are also manually run for separate purposes. The 2 that it's working for I manually did not set up any print parameters like margins, specific printer, but for the 2 that it's not working I did originally, but removed those settings to match the settings of the 2 reports that work. When I manually run the 2 that work and print no SAVE dialog box presents, but it does for both the reports that don't work. The code appears to stop at this point and cancels the output.
Any suggestions of what I can do to get this working for all 4 reports?
All help appreciated. Thanks
Ginny
Code:
DoCmd.OutputTo acOutputReport, "ReportName", acFormatPDF, myPathnFile
This is working perfectly for 2 of the reports but not for the other 2. These reports are also manually run for separate purposes. The 2 that it's working for I manually did not set up any print parameters like margins, specific printer, but for the 2 that it's not working I did originally, but removed those settings to match the settings of the 2 reports that work. When I manually run the 2 that work and print no SAVE dialog box presents, but it does for both the reports that don't work. The code appears to stop at this point and cancels the output.
Any suggestions of what I can do to get this working for all 4 reports?
All help appreciated. Thanks
Ginny