Solved

MS Access - obtain printer collection on client

Posted on 2014-09-16
6
187 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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

744 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now