Changing printer

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top