Solved

MS Access - obtain printer collection on client

Posted on 2014-09-16
6
198 Views
Last Modified: 2014-10-19
My AP (accde) is started on the Client having been loaded from the Server.  

My code reads the printer collection found on the Server to tell me which printer was used in report design..   I now need code to read the printer collection on the Client to see if that printer is shared by the client.  Any help appreciated....   Once found I will use the Client printer for the report.

Thanks,
Frank
0
Comment
Question by:FrankBabz
  • 3
  • 2
6 Comments
 
LVL 84

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 400 total points
ID: 40327559
My AP (accde) is started on the Client having been loaded from the Server.
 This is a bad idea in itself - you should install a copy of the accde on the client machine and run it from there.

That said, your code should read the Printers collection on the machine where it's being run (i.e. the workstation). Can you confirm it's not doing that?
0
 
LVL 57
ID: 40327587
Scott,

  I think this is a terminal services/RDP situation;  Frank, is that the case?

Jim.
0
 

Author Comment

by:FrankBabz
ID: 40328114
Jim...   sort of Yes (for future?)... but mostly No.   Today... The Client's PC is on a local LAN with the Server... On occasion, the user may RDT connect to the Client PC. (not to the server)...  I think Scott has me on the right track for my problem.

Scott...  Totally agree...  Bad Idea... but it is designed well enough to have lasted for 10 years.   I am patching AP that needs DYMO printer fix ASAP.  Dealing with that DYMO printer I assumed I was reading the server's printer collection from the Client.  

Having pointed out it is the Client PC's printer collection (not the servers)...   and with that in mind...  I will look at existing code differently knowing now that the DYMO driver that is installed on the server (must be shared) and...  MUST also be installed on the Client as "On ServerName".     Correct???

Curiously...   If AP was a proper FE and BE design...   Could it eliminate the need to have the DYMO driver installed on the Client?   and was that where Jim was wondering the problem might be?    Then... I wonder about an RDP design rather than a FE BE.

Thanks (again) and always for your help....
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 57

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 100 total points
ID: 40328296
Frank,

<<Today... The Client's PC is on a local LAN with the Server... On occasion, the user may RDT connect to the Client PC. (not to the server)...  I think Scott has me on the right track for my problem.>>

  OK....when you said you were reading the servers printers, I took that to mean you were using RDP, as that would be the case, and a reflection of what Scott said; the printers collection you get is the one where the MSACCESS.EXE is actually running.

 In a RDP session, that would be on the Terminal services host.  Anything else, it would be running on the client PC.

<< MUST also be installed on the Client as "On ServerName".     Correct???>>

  Yes.

<<Curiously...   If AP was a proper FE and BE design...   Could it eliminate the need to have the DYMO driver installed on the Client? >>

  No.   The app being a proper FE/BE design reduces network usage, increases performance, and takes care of a few other issues (like temp tables).

  What you need to keep in mind is where MSACCESS.EXE is actually executing.  The DB no matter where it's located has nothing to do with printers, drives, etc.

  And no points please.  I only jumped in to clarify the question really.

Jim.
0
 

Assisted Solution

by:FrankBabz
FrankBabz earned 0 total points
ID: 40328416
Thanks Jim...  I appreciate your helpful reply and answers.     ...Frank
0
 

Author Closing Comment

by:FrankBabz
ID: 40389838
Tips:
A) When designing reports in Access select Dymo in order to get acceptable margins (not default printer). If code below is done right you will not have a margin issue.... finish design having saved report with Dymo selected works best.

B) A above assumes your code will traverse and find the correct DYMO printer in the printer collection, select it, print report, and return with whatever was the active printer prior to this code snippet..

C)  In traversing....  selecting the DYMO requires smarts to determine if collection contains Dymo printer installed as a local or shared printer on client where code in B is running.  DYMO printer must be installed on the Client or it will not be in the collection.

Enjoy....
0

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question