I have code that opens a report for the current open form. It works fine, BUT, I would like for it to print directly to the printer rather than prieview it.
My code attached to my print report button is:
DoCmd.OpenReport "Card Charge Form", acViewPreview, , "[Order ID]=" & OrderID, acDialog
If I change acViewPreview to acViewNormal it prints a report for ALL records, and not the selected one that displays with the Preview command.
What am I doing wrong by making it print all records, and what do I need to change to have it print just one record/report?
Better yet... Would it be possible to open the report in preview mode (like it does already), then have a dailog or some kind of button attached to it that when clicked, it will print the report?
My code attached to my print report button is:
DoCmd.OpenReport "Card Charge Form", acViewPreview, , "[Order ID]=" & OrderID, acDialog
If I change acViewPreview to acViewNormal it prints a report for ALL records, and not the selected one that displays with the Preview command.
What am I doing wrong by making it print all records, and what do I need to change to have it print just one record/report?
Better yet... Would it be possible to open the report in preview mode (like it does already), then have a dailog or some kind of button attached to it that when clicked, it will print the report?