Solved Selecting printer tray (1 Viewer)

PaquettePaul

Member
Local time
Today, 10:20
Joined
Mar 28, 2022
Messages
107
When I am printing a report, I use the command “DoCmd.OpenReport xreportnamex, acViewNormal”. This works fine when there is only one tray in the printer.

A problem exists where the user has two trays, one for letter and one for legal size. Access is always selecting the legal size (11x14) rather than the letter size even if the trays are reversed. The reports print ok on letter size without leakage to another page, so that is not a problem. What I would like to do is print only on letter size by: a code default, changing something in the report setup config, or invoking the print options screen as would be shown when using Word or Excel.

Any recommendations for this?
 

PaquettePaul

Member
Local time
Today, 10:20
Joined
Mar 28, 2022
Messages
107
In the current report Page Setup, the Size is set to Letter and Source is Main Tray.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 09:20
Joined
Feb 28, 2001
Messages
27,187
The question would then be how the trays are set up. These days you can lie to the printer and say it is loaded for letter size when it actually is a larger paper size. (For instance, I'm always having trouble telling it to print 4x6 photo paper... a misfeed and suddenly I've printed on letter size paper.) I think the printer would catch you if it was shorter.
 

KitaYama

Well-known member
Local time
Today, 23:20
Joined
Jan 6, 2022
Messages
1,541
If you want the user select the tray, you can bring up the printer dialogue box.
DoCmd.RunCommand(acCmdPageSetup)

If you want to do it with vba, you can use paperbin property to set or retrieve the paperbin

With Reports("MyReport").Printer
.PaperBin = ....
The constants are :

  • acPRBNAuto '(Default) Use paper from the current default bin
  • acPRBNCassette 'Use paper from the attached cassette cartridge
  • acPRBNEnvelope 'Use envelopes from the envelope feeder
  • acPRBNEnvManual ' Use envelopes from the envelope feeder, but wait for manual insertion
  • acPRBNFormSource ' Use paper from the forms bin
  • acPRBNLargeCapacity ' Use paper from the large capacity feeder
  • acPRBNLargeFmt ' Use paper from the large paper bin
  • acPRBNLower ' Use paper from the lower bin
  • acPRBNManual ' Wait for manual insertion of each sheet of paper
  • acPRBNMiddle ' Use paper from the middle bin
  • acPRBNSmallFmt ' Use paper from the small paper feeder
  • acPRBNTractor ' Use paper from the tractor feeder
  • acPRBNUpper ' Use paper from the upper bin
 

Users who are viewing this thread

Top Bottom