Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2005

    Unanswered: Select a Printer

    Is there an easy way when setting up a print button, to open up the printer dialog box so you can pick the printer you want to use instead of it printing to the default printer? I can't find anything in Help.


  2. #2
    Join Date
    Feb 2004
    Chicago, IL
    If you are using 2002 or higher check out the Printers property. I think you will have to create your own form for the user to select from. Then use the following code to use the printer that was selected.

        Dim rptToPrint As Report
        'Open the report in preview mode so that you can change the printer settings for the report
        DoCmd.OpenReport strReportName, acViewPreview, , strWhere
        Set rptToPrint = Reports(strReportName)
        'Change the printer the report will use to Adobe PDF
        rptToPrint.Printer = Application.Printers("Device Name")
        rptToPrint.Printer.PaperSize = lngPaperSize
        rptToPrint.Printer.Orientation = lngOrientation
        'Print out the current report
        DoCmd.PrintOut acPrintAll
        DoCmd.Close acReport, strReportName, acSaveNo
    Keep in mind this is not working code. It is all the elements you will need to print to a specific printer. You need to open the report in Preview mode then change the printer information, then print out the report and finally, close the report.

  3. #3
    Join Date
    Dec 2005
    Thanks for the tip. I'll give it a try.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts