Reports To Different Trays

mlcktmguy
mlcktmguy used Ask the Experts™
on
I have developed an application for a client that has the one option to print a cover letter and account statement for a given client.  These will be done one client at a time.  Both of the outputs are on 8.5 x 11.  The account statement prints on a pre-printed form.

The would like the client letter to be sent to tray 1 and the statement to tray 2.  How can this be done generically on a report?  The only options I see on page set up are
Automatic,  Manual Paper Feed and Cassete.  I guess setting the statement to Manual would at least pause so they could change the paper but a smoother process is obviously preferable.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Nerd
Most Valuable Expert 2012
Top Expert 2013
Commented:
You can do this if your printer trays have different names.   These names show up as options if you open the print dialog box.  For example, you might have HPPrinterTray1 and HPPrinterTray2 (I'm not sure how to set these names up, but your client's IT folks should be able to do it).


With those names, you can use the Printer Property to set the default printer for your reports through VBA:


' Set a global variable to retain the default printer

Global gprtDefPrinter as Printer

' then in the open event of your report, save the original default printer
prtDefPrinter = Application.Printers("HPPrinterTray1")

'  Restore the original default at a later pont in the code when done printing
Application.Printer =gprtDefPrinter

Open in new window

Jeffrey CoachmanMIS Liason
Most Valuable Expert 2012

Commented:
<The account statement prints on a pre-printed form.
The would like the client letter to be sent to tray 1 and the statement to tray 2. >
So the "Account Statement" and the "Client Letter' are two separate "Reports"?
If so, you may be able to do this by setting the default printer in the Report's Page Setup and select the needed tray in the Properties...

Another option would be to recreate the "Account Statement" with an Access report. (by scanning the original and inserting it as a graphic on an Access Report.)
Then you could even connect the two reports (use one as the Report or Page Header) and print them out at the same time on the same printer.

Author

Commented:
Sorry for the delay, I haven't had a chance to evaluate/try any of the suggestions.
mbizupNerd
Most Valuable Expert 2012
Top Expert 2013

Commented:
Okay - The solution I posted is tried and true, so I'm confident that it will work for you.

That said, if you have any issues with it, I am still subscribed to the question and you can either post here with any follow up problems or use the Request Attention button to have the question reopened.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial