Results 1 to 10 of 10
  1. #1
    saeedmzm is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Jul 2017
    Posts
    8

    how to assign printers to print specific report

    MY Dear ,,

    how to assign printer to print specific report

    i mean to choose one printer available in PC to printer specifically report i had selected




    if i move and put the program to another pc >>> i can choose the printer to print the specfic report

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Are you still using ac2003? I believe each Report can assign a printer while in the design mode.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    In report design, click Specific printer, set printer,
    save.

  4. #4
    saeedmzm is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Jul 2017
    Posts
    8
    i want to do that by code or by command

    after i have finshed the program and i like to use in another pc

    if i use another pc .... i have to assign manually in report
    i like to use it by code or command

  5. #5
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Application.Printer = Printers(Device Name Of Printer Goes Here)
    or use the name of a variable that holds the device name.
    Then open the report (I guess not in print preview mode).
    Then again, opening the report in print preview would allow anyone to choose the desired printer. Is this because they don't know which one to select for this report?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    saeedmzm is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Jul 2017
    Posts
    8
    my dear .... can you post examples
    if u do not mind

  7. #7
    Micron is offline Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Application.Printer = Printers(Device Name Of Printer Goes Here)
    DoCmd.OpenReport "Name Of Your Report Here"

    You will have to provide what comes before and after since you really haven't revealed much.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,822
    Here is example from my db:

    Code:
    Private Sub btnPrint_Click()
    'print to the color printer
    Dim strDefaultPrinter As String
    'load the current default printer into the variable strDefaultPrinter
    strDefaultPrinter = Application.Printer.DeviceName
    'switch to Konica printer for color printout
    Set Application.Printer = Application.Printers(\\servername\printername )
    'try to set printer for color - doesn't work, also tried API coding and that didn't work either
    ''Application.Printer.ColorMode = acPRCMColor
    ''Forms("ConcreteMixTools").Printer.ColorMode = acPRCMColor
    Me.Detail.BackColor = vbWhite
    DoCmd.PrintOut
    'change the printer back to the default printer
    Set Application.Printer = Application.Printers(strDefaultPrinter)
    End Sub
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    saeedmzm is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Jul 2017
    Posts
    8
    ​any more example for this problems

  10. #10
    saeedmzm is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Jul 2017
    Posts
    8
    Quote Originally Posted by June7 View Post
    Here is example from my db:

    Code:
    Private Sub btnPrint_Click()
    'print to the color printer
    Dim strDefaultPrinter As String
    'load the current default printer into the variable strDefaultPrinter
    strDefaultPrinter = Application.Printer.DeviceName
    'switch to Konica printer for color printout
    Set Application.Printer = Application.Printers(\\servername\printername )
    'try to set printer for color - doesn't work, also tried API coding and that didn't work either
    ''Application.Printer.ColorMode = acPRCMColor
    ''Forms("ConcreteMixTools").Printer.ColorMode = acPRCMColor
    Me.Detail.BackColor = vbWhite
    DoCmd.PrintOut
    'change the printer back to the default printer
    Set Application.Printer = Application.Printers(strDefaultPrinter)
    End Sub

    my dear can you upload here the example

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

Similar Threads

  1. Print form to choice of printers
    By gg80 in forum Programming
    Replies: 6
    Last Post: 08-21-2015, 10:46 AM
  2. Print specific report based on form check boxes
    By Eddy Sincere in forum Reports
    Replies: 3
    Last Post: 05-13-2015, 08:07 PM
  3. Printing report on different printers
    By mujaqo in forum Reports
    Replies: 3
    Last Post: 01-09-2014, 06:57 AM
  4. print a specific report
    By cvolkers in forum Reports
    Replies: 4
    Last Post: 09-13-2010, 11:38 PM
  5. Print a specific record report from a form
    By cynthiacorley in forum Reports
    Replies: 27
    Last Post: 02-08-2010, 06:34 AM

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