Hello,
I've come accross the following issue when using the docmd.printout command in vba.
I have a listbox in a form which can contain a variable amount of reports.
I've created a button to print all these reports to the standard printer.
Due to vba-code that runs when I open a single report, I have to open each report separately.
Also due to this vba-code, I can not open the report in acViewNormal.
I've now created a loop that always opens the report in acViewPreview and then I run the docmd.printout command.
The first report is printed correctly to the standard printer and then closed.
The next report is opened and printed, but instead of the standard printer, it uses my pdf-printer.
Does anyone have an idea why this is the case?
I tried setting the printer to the standard printer in the loop before the report opens, but still the same.
With kind regards,
I've come accross the following issue when using the docmd.printout command in vba.
I have a listbox in a form which can contain a variable amount of reports.
I've created a button to print all these reports to the standard printer.
Due to vba-code that runs when I open a single report, I have to open each report separately.
Also due to this vba-code, I can not open the report in acViewNormal.
I've now created a loop that always opens the report in acViewPreview and then I run the docmd.printout command.
The first report is printed correctly to the standard printer and then closed.
The next report is opened and printed, but instead of the standard printer, it uses my pdf-printer.
Does anyone have an idea why this is the case?
I tried setting the printer to the standard printer in the loop before the report opens, but still the same.
With kind regards,