Solved

MS Access - obtain printer collection on client

Posted on 2014-09-16
6
192 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
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…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

809 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