I tried this during the opening of the form in which the PO is printed. The data entry takes place on this form and then the print event is called from the form.
I figured if I opened and edited the report when this form was opened then it would preserve the settings for that user.
The papersize nor copies worked on this.
I also put this:
Reports("rptPO").Printer.P
Reports("rptPO").Printer.C
which yielded no results either.
any ideas on why this is not changing the settings?
Main Topics
Browse All Topics





by: thenelsonPosted on 2009-09-22 at 06:23:18ID: 25392465
Check to make sure the printer port names on all your computers are exactly the same. If the printer is a network printer using IP address then the settings will always reset. om/kb/2089 12/en-us
/reports/r pt0009.htm or you can use 's an API workaround too: qs.cfm?fid =5479
Reference: http://support.microsoft.c
If you need to you can set the printer settings using code when you open the report.
Access 2002+, you can use printer objects:
Sub SetPrinter(strFormname As String)
DoCmd.OpenForm FormName:=strFormname, view:=acDesign, _
datamode:=acFormEdit, windowmode:=acHidden
With Forms(form1).Printer 'Within the form's code you can use With Me.Printer
.DeviceName = **Name of printer as listed in Printers and Faxes** 'To change the printer You also need to set UseDefaultPrinter = false
.TopMargin = 1440
.BottomMargin = 1440
.LeftMargin = 1440
.RightMargin = 1440
.ColumnSpacing = 360
.RowSpacing = 360
.ColorMode = acPRCMColor
.DataOnly = False
.DefaultSize = False
.ItemSizeHeight = 2880
.ItemSizeWidth = 2880
.ItemLayout = acPRVerticalColumnLayout
.ItemsAcross = 6
.Copies = 1
.Orientation = acPRORLandscape
.Duplex = acPRDPVertical
.PaperBin = acPRBNAuto
.PaperSize = acPRPSLetter
.PrintQuality = acPRPQMedium
End With
DoCmd.Close objecttype:=acForm, objectname:=strFormname, _
Save:=acSaveYes
End Sub
Before 2002 with an mda file you can use PrtDevMode, PrtDevNames, and PrtMip properties - very complicated - consult the Win32 Software Development Kit for complete documentation or http://www.mvps.org/access
Microsoft: Access Modules (VBA Coding) FAQ - Change the Default Printer
http://www.tek-tips.com/fa
Before 2002 with an mde file, your only option is using RunCommand acCmdPageSetup with Sendkeys before each print. For example:
Sendkeys "{RIGHT}%zll~"
RunCommand acCmdPageSetup
will set the page setup to legal size paper for most printers.