N
Newbie
Hi,
I have a custom sized label for a dot matrix printer that I want to be able
to print on any dept printer that is selected.
My problem is that even though I can change where to print to it does not
always use the correct paper size
What am I doing wrong?
here is a code snippet - using a select case to set the correct department
printer
Select Case frmLocation.Value
Case 1 'Purchasing office
Set prt = Nothing
Set prt = Application.Printers(\\compname1\LabelsGRN")
Set Application.Printer = prt
case 2 ' Accounts
set prt = nothing
set prt = application.printers("\\compname2\LabelsGRN")
end select
With prt
.PaperSize = acPRPSUser
.Orientation = acPRORPortrait
End With
' Set report's printer to selected printer.
docmd.openReport "rptLabelGRN",acViewPreview,,,acWindowNormal
Reports("rptLabelGRN").Printer = prt
DoCmd.Close acReport, "rptLabelGRN", acSaveYes
DoCmd.OpenReport "rptLabelGRN", acViewPreview, , , acWindowNormal
I have a custom sized label for a dot matrix printer that I want to be able
to print on any dept printer that is selected.
My problem is that even though I can change where to print to it does not
always use the correct paper size
What am I doing wrong?
here is a code snippet - using a select case to set the correct department
printer
Select Case frmLocation.Value
Case 1 'Purchasing office
Set prt = Nothing
Set prt = Application.Printers(\\compname1\LabelsGRN")
Set Application.Printer = prt
case 2 ' Accounts
set prt = nothing
set prt = application.printers("\\compname2\LabelsGRN")
end select
With prt
.PaperSize = acPRPSUser
.Orientation = acPRORPortrait
End With
' Set report's printer to selected printer.
docmd.openReport "rptLabelGRN",acViewPreview,,,acWindowNormal
Reports("rptLabelGRN").Printer = prt
DoCmd.Close acReport, "rptLabelGRN", acSaveYes
DoCmd.OpenReport "rptLabelGRN", acViewPreview, , , acWindowNormal