Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MS Access - obtain printer collection on client

Posted on 2014-09-16
6
Medium Priority
?
217 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 1600 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 58
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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 58

Assisted Solution

by:Jim Dettman (Microsoft MVP/ EE MVE)
Jim Dettman (Microsoft MVP/ EE MVE) earned 400 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: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
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 …

670 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