Results 1 to 4 of 4
  1. #1
    mujaqo is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2008
    Posts
    13

    Printing report on different printers


    I have simple table with two fields (ItemName and PrinterName), how can I print each group of items on the printer that is available in PrinterName field using the same report?
    Example of table content:
    ItemName PrinterName
    The Calamitous 14th Century HP Deskjet 2540
    The Fates of Human Societies HP ENVY 4500
    The Civil War Era HP Deskjet 2540
    Eyewitness Travel Guide HP LaserJet Pro P1102w

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,738

  3. #3
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    614
    Following are bits of code you may use
    Use the Application.Printer property
    Code:
    'List of printers
    Dim prt As Printer
    For Each prt In Application.Printers
    Debug.Print prt.DeviceName
    Next prt
    
    'to print same report on different printers
    
    'Save the default printer name
    DefaultPrinter = Application.Printer.DeviceName
    
    'Change the printer to desired one
    Set Application.Printer = Application.Printers(YourPrinterName)    'You can use Dlookup instead of YourPrinterName to get the desired printer from the table.
    'print the report
    DoCmd.OpenReport "YourReportName", acNormal
    'Set the default printer back
    Set Application.Printer = Application.Printers(Default)

  4. #4
    mujaqo is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2008
    Posts
    13
    Thank you so much amrut

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Changing Printers Code produces an error
    By Perceptus in forum Programming
    Replies: 4
    Last Post: 01-15-2013, 08:33 PM
  2. Printing report
    By undee69 in forum Forms
    Replies: 1
    Last Post: 06-26-2012, 08:10 PM
  3. Replies: 1
    Last Post: 10-18-2011, 07:10 PM
  4. Report printing
    By Andrevw in forum Reports
    Replies: 1
    Last Post: 01-16-2011, 06:08 PM
  5. Report Printing
    By newtoAccess in forum Reports
    Replies: 5
    Last Post: 12-02-2009, 07:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums