Results 1 to 5 of 5
  1. #1
    Gail is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jun 2017
    Posts
    37

    Access Reports print to correct tray on old printers but not on new ones

    I have an Access program that is used by one company with 5 branches and each branch has their own printer with 4 trays.
    Their IT made 4 copies of their printer and selected a different tray for each copy.
    When I print a report from the Access program, that needs to print on a certain tray, I do the following:
    - Save the default printer name.
    - Find the specific printer. Ex: if the report should go to tray 2, I find the printer by name, that has the paper source set to tray 2
    - I set the default printer to the specific printer, print the report, then set the default printer back to the saved default printer.
    This has worked well for many years.

    The problem is that now two branches have new printers with 4 trays each. (different brands of printers)
    Their IT has set them up the same way as the old ones with 4 copies of the printer.
    When I print a report that should go to a specific tray, the report always goes to the default tray.
    The only way I can get a report to print to a different tray, is to manually design the report and set the paper source to the correct tray.

    The branches with the old printers still work, whereas the branches with the new printers always prints to the default tray.
    All the branches are using a copy of the same Access program.
    So I would like to change the tray programmatically for each branch, as they use different trays for different reports.



    I've tried opening the report in preview and setting the PaperBin. This doesn’t work.

    I’ve tried the PrintMgt example by Allen Browne, this also doesn’t work.

    Their IT Department can't figure it out.

    Does anyone know what has changed in Access for new printers? Or how to get around this problem?

    Thanks,
    Gail

  2. #2
    alborg is offline Novice
    Windows 11 Office 365
    Join Date
    Dec 2022
    Location
    Virginia, USA
    Posts
    11
    I'm not sure what is happening with the new vs old printers, but in my office I've always had a table, I call it "tblSettings", where I set all the local settings, from a field with which drive to look for the backend tables, another field where the name of the active physician using the computer... to fields associated with printer settings. You can have printer default settings for each report that is used in different fields of the tblSettings table, results of which can be changed by the end user depending on his/her environment. It should work for you.

  3. #3
    Gail is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jun 2017
    Posts
    37
    Quote Originally Posted by alborg View Post
    I'm not sure what is happening with the new vs old printers, but in my office I've always had a table, I call it "tblSettings", where I set all the local settings, from a field with which drive to look for the backend tables, another field where the name of the active physician using the computer... to fields associated with printer settings. You can have printer default settings for each report that is used in different fields of the tblSettings table, results of which can be changed by the end user depending on his/her environment. It should work for you.
    Thank you so much for replying to my question.
    This has been a very confusing problem and I hope I am explaining it clearly.

    I do have a table with the report name and the printer name.
    Each Branch can choose the printer for each report. They only have to do it once unless they get a new printer, then they will have to choose the new printer.
    They don't have to choose the printer each time they print the report because I have a button that runs a procedure.
    The procedure saves their default printer, looks up the specific printer on the table and sets it to the default printer, prints the report and then sets the default printer back to the saved default printer.
    This has worked for almost 10 years on the old printers.

    For the new printers, I have tried also saving the tray number in the table.
    Then at runtime I tried opening the report in Preview and setting the PaperBin to that tray number.
    In my office I have a printer with 2 trays and setting the PaperBin in this way works.
    But it doesn't work on the 4 tray printers at my customer's offices.

    I have thought of creating a procedure to design each report and set the PaperBin according to the table. I would run this for each branch.
    But the following code doesn’t save the PaperBin on Close.
    Do you know why the following doesn’t work?

    DoCmd.OpenReport "TestReport", acViewDesign
    Reports("TestReport").Printer.PaperBin = 2
    DoCmd.Close acReport, "TestReport", acSaveYes

    When I break before the close, I can see that the PaperBin has been set.
    but once the report is closed, it is not set.

    Thanks

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,556
    Another way to approach it possibly.
    Some printers allow you to save settings for a print job.
    Perhaps see if that is possible for you.?

  5. #5
    Gail is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jun 2017
    Posts
    37
    Quote Originally Posted by Welshgasman View Post
    Another way to approach it possibly.
    Some printers allow you to save settings for a print job.
    Perhaps see if that is possible for you.?
    thank you so much for the idea.
    I never knew that and I'll definitely look into it.

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

Similar Threads

  1. Printers. Which tray?
    By TOPSie in forum Access
    Replies: 11
    Last Post: 02-21-2024, 10:22 AM
  2. Print Reports by day for next week with Correct Dates
    By LogicalHamster in forum Reports
    Replies: 8
    Last Post: 09-20-2018, 08:41 AM
  3. Replies: 9
    Last Post: 07-27-2017, 06:39 AM
  4. Replies: 1
    Last Post: 07-18-2017, 06:35 PM
  5. Print form to choice of printers
    By gg80 in forum Programming
    Replies: 6
    Last Post: 08-21-2015, 10:46 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