Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 33
  1. #16
    LadyScot101 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    18

    Davegri, that just brings up a Macro Box. Is the "Microsoft Print to PDF" supposed to be a different name?

  2. #17
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,407
    Is the "Microsoft Print to PDF" supposed to be a different name?
    That's an example of a printer installed on my PC.
    Change it to the name of a printer installed on your PC (which may physically exist on a network in your case).
    To see a list of printers installed on your PC, go to Control Panel, Devices and Printers (or in Windows 10, Settings, Devices, Printers & Scanners).
    Last edited by davegri; 02-09-2018 at 10:55 AM. Reason: more

  3. #18
    LadyScot101 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    18
    But the printer is set in the line above it, so why would you assign it twice?

  4. #19
    LadyScot101 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    18
    I entered
    Reports(stDocName).Printer = Application.Printers("\\svpprintv01\wwtrmt-1")
    and it came up to the Macro Box

  5. #20
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,407
    and it came up to the Macro Box
    I assume this is bad? I don't know what a macro box is.
    Did you look at Devices and Printers to see if this printer is available on your PC? The name you put in must match exactly what is shown there.

  6. #21
    LadyScot101 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    18
    This is the printer that everyone prints to. The print server's name is svpprintv01 and the printer is wwtrmt-1. It's set as default on the computers, it just doesn't take it within Access unless you go through the settings and we don't want the users doing anything but pressing the button they have always pressed. The Macro Box is the box that you actually create Macros in or search for existing ones. That's why I'm thinking it's not understanding it has to go through a print server to get to the printer in question. If it would just look at the default set on the computer, then everything would be so easy. LOL!

  7. #22
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,407
    Did you look at Devices and Printers to see if this printer is available on your PC? The name you put in must match exactly what is shown there.

  8. #23
    Micron is online now Virtually Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,793
    That's why I'm thinking it's not understanding it has to go through a print server to get to the printer in question
    Or does it? As I noted, the printer name may be enough. That's what I saw in other examples, but I don't see where you tried that.

    FWIW, I thought you wanted to control and "set" the printer, not switch back and forth, so I still don't see the point in 'assigning' the default printer first - unless it ends up switching the printer for all programs. I wouldn't expect that since it appears to be set at the Application level, which should have no effect outside of Access. Maybe it ends up that way for any Access db, not just the one you made the setting in. But I said I'm no expert in this subject, so I'll leave it to others.

  9. #24
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Ditto, Micron.

    If you want to print to printer already set as default for all users then why are you bothering with code to assign default printer?

    Aren't printer connections (set up in Devices and Printers) associated with Windows USERNAME? So multiple users on same computer don't necessarily have the same printer connections? Therefore, user (as known by Windows login) must be connected to printer for this code to work? Or are printer connections associated with the computer regardless of user login?

    So, printer must have connection set to computer or user.

    Unfortunately, I no longer have access to a LAN for testing.

    By 'Macro Box', do you mean the box that pops up with a list of macros to choose (it lists all the general modules subs in my db)? I can force this box if I try to 'Run' a VBA function like a sub in the VBA editor instead of calling function.
    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.

  10. #25
    LadyScot101 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    18
    Micron, I tried just putting wwtrmt-1 and it went to the Macro Box. Didn't work. I'm trying what y'all are putting on here, so if you are putting it to switch back and forth, then that's what I'm trying as code. I'm not been coding very long, so that is why I'm trying to find someone that knows about network printers. It does go through a network printer and no the users and computers are not assigned a specific printer, since we are so big. The user has to connect through devices and printers from a list of printers that are on the print servers. The printer is set as default on the computer, but Access 2016 doesn't recognize it without the user going through the page setup and they are not allowing them to do that. They want it set up the way it was in Access 2010. Unfortunately, that means coding is my understanding.

  11. #26
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Access should print to whatever is set as the default printer in Windows without any code. I have no idea why Access 2016 would be any different.

    Excel and Word have no printing issue?

    However, that still does not explain why you get 'Macro Box' (BTW, you still haven't clarified what that box is).

    If you are now using Access 2016, why don't you modify your profile?
    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.

  12. #27
    LadyScot101 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    18
    Users don't modify anything. It's an issue with Office 365 Access 2016. It will not go off the default printer set on your computer. I've explained this in previous threads. Also, explained previously that the Macro Box that pops up is the Macro Box that you create a Macro in. With the code that was previously presented above, it goes to that. I'm assuming it's looking for a Macro for some reason. Why, can't tell ya. All I know from what I've read on the web on Access 2016, is that it doesn't act like previous versions and it doesn't take the default. You either code it or the user has to do the Page Setup within the report. We don't code in Excel and Word, so I'm just looking for Access coding help.

  13. #28
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,407
    Third attempt to get information:
    Did you look at Devices and Printers to see if this printer is available on your PC? The name you put in must match exactly what is shown there.
    Also can you post a picture of the "Macro Box"?

  14. #29
    LadyScot101 is offline Novice
    Windows XP Access 2010 32bit
    Join Date
    Mar 2013
    Posts
    18
    Doesn't work with our network printer.

  15. #30
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    So it's only an issue with Office365 Access? Access will not simply print to the default network printer but Excel and Word do? Weird.

    You tried: Reports(stDocName).Printer = Application.Printers("\\svpprintv01\wwtrmt-1")

    stDocName is a VBA variable. Where is your code to set that variable? What is the name of the report you want to print?
    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.

Page 2 of 3 FirstFirst 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Use VBA to Rename a Default Ribbon Tab in Access 2016
    By jeffreymiller in forum Programming
    Replies: 1
    Last Post: 11-18-2016, 08:43 AM
  2. Set Default Printer
    By jo15765 in forum Modules
    Replies: 5
    Last Post: 02-18-2016, 07:05 AM
  3. Access 2016 Default Value Issue
    By breakingme10 in forum Forms
    Replies: 7
    Last Post: 09-23-2015, 10:07 AM
  4. Setting Default Printer Properties with VBA Cocde
    By EddieN1 in forum Programming
    Replies: 2
    Last Post: 12-04-2014, 11:02 AM
  5. Replies: 3
    Last Post: 02-25-2014, 11: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