To save and send a report I use:
DoCmd.OutputTo acOutputReport, "rptReportName", acFormatPDF, strFullCurPathFile, False
The variable strFullCurPathFile is the full path and file name where I want to have the file:
"C:\Users\...458\CES3458.pdf"
I do get an error processing the line:
Error 2059 object not found
I want to print a query for the report for a single record do I need to specify this before I can print the report with the DoCmd?
This is what generates the correct report in the code:
DoCmd.OpenReport "rptOrderDetails", acViewReport, "queOrderSum", "OrderId =" & lgOrderId, acWindowNormal
Any Ideas
DoCmd.OutputTo acOutputReport, "rptReportName", acFormatPDF, strFullCurPathFile, False
The variable strFullCurPathFile is the full path and file name where I want to have the file:
"C:\Users\...458\CES3458.pdf"
I do get an error processing the line:
Error 2059 object not found
I want to print a query for the report for a single record do I need to specify this before I can print the report with the DoCmd?
This is what generates the correct report in the code:
DoCmd.OpenReport "rptOrderDetails", acViewReport, "queOrderSum", "OrderId =" & lgOrderId, acWindowNormal
Any Ideas
Last edited: