• Status: Solved
  • Priority: High
  • Security: Public
  • Views: 36
  • Last Modified:

Need Help Selecting a Specific Printer in MS Access

I'm in the process of converting a MS Access 2K compiled application that was developed to run on XP so that it will also run on Win 10 computers.
Our goal is to get the application to run on both platforms so we do not have to replace all of our machines.

 (We understand the risks in using XP machines and have taken steps to mitigate them, so please help me solve this problem rather than tell me why I should not use XP).

The problem is that when XP connects to a networked printer then printer name assigned is "printername on servername": for example, "Shipping on FileServerPro".
When I generate a report in MS Acesss I have the option of selecting the default printer or a specific printer.  Each employee has a printer near his or her desk that is set up as the default printer.  Reports that need to print to the shipping print are hardcoded to print on "Shipping on FileServerPro".

Windows 10 uses a different naming convention for network printers, causing the printer name to appear simply as "Shipping" in the Printers and Faxes section.

As a result, when the MS Access code is executed in attempt to print to the shipping printer, we get an error message which essentially states that Access can not find "Shipping on FileServerPro" when run on Win 10 computers (of course this is because the Win10 computer knows the printer simply as Shipping).

I can make changes to the XP machines, or the Win10 machines, or to Access, but I need the same code to print to my networked shipping printer on both platforms.
0
pcalabria
Asked:
pcalabria
  • 4
  • 2
1 Solution
 
John TsioumprisSoftware & Systems EngineerCommented:
Well you could either iterate the installed printers and do a partial match on the device name or you could refer to it by IP bypassing the naming conventions.
0
 
pcalabriaAuthor Commented:
@john. Does Access allow me to do this?  The only way I know to select a specific printer is to open the form in design view, select page setup, then select specific printer on the middle tab, select a printer from the drop down.

The only printers that appear on the drop down are those installed for the computer.

Is there a way to do this through code?
0
 
John TsioumprisSoftware & Systems EngineerCommented:
In this article you can check how you iterate Printers collection.
After that you can set printer described like in this Ms Article
For a complete solution check Allen Browne PrintMgr
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
pcalabriaAuthor Commented:
@John  This looks very promising... I'm looking into it today... The code needs to work on both XP and Win10...currently we use Access 2K to compile...If I compile with a later version of Access I'm not sure what to do to get that new code to work on the XP machines, which also have a licensed version of Access 2K installed... any thoughts would be appreciated.
0
 
pcalabriaAuthor Commented:
More complicated than I had hoped (because access 2000 is not supported) but I'm still trying to work things out.
0
 
pcalabriaAuthor Commented:
It seems that my problem is actually caused by a driver issue, which we are addressing in another question.  Thanks for your continued help and support.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now