Solved

MS Access - obtain printer collection on client

Posted on 2014-09-16
6
191 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

919 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

19 Experts available now in Live!

Get 1:1 Help Now