Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print Command Button to Another Printer

Status
Not open for further replies.

MAPetry

Technical User
Aug 2, 2000
43
US
I have two print command buttons on a form. One prints to default printer the other needs to print to a different printer. Is there a line of code I can add to tell it where to print?
 
there is a very complex way to specify a specific printer. However it is not too advisable because if someone does not have that printer installed or have it installed just under a different name it won't work.
A better solution might be to bring up the print dialog box in which the user can choose one of their installed printers.

I'm not at a computer that has access on it now, but I believe the command for that is:
Docmd.RunCommand acCmdPrint

If it's wrong I'll correct it tommorrow

Hope this helps.
 
I tried the command and it works to print the form. I guess I should have specified that I am printing a report for the current record. This is the code for my other report that prints the current record only to the default printer.
I need to print the RptFaxCover to another printer for the current record only. I tried adding the acCmdPrint and could not get it to work. Any suggestions.
Thanks for your help


Private Sub PrtFaxCover_Click()
Me.Refresh
Dim strReportName As String
Dim strWhere As String

strReportName = "RptFaxCover"
strWhere = "[FAXID]=" & Me!FAXID
DoCmd.OpenReport strReportName, acNormal, , strWhere

End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top