Link to home
Start Free TrialLog in
Avatar of Y2Kingswood
Y2Kingswood

asked on

Printer Location and Model

I am trying to figure out how i can populate a drop down with the printer device name in column 1 (i know how to do from before here) and location & " - " & model in column 2, either from the printers on that machine (local or not) or all of the printers available over the network. (VBA of Course)
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

This information is covered in depth in the "Access Developers Handbook", Desktop Edition

(In the Access 2000 version it is chapter 10.)

Hope this helps
Avatar of Y2Kingswood
Y2Kingswood

ASKER

Where would i find this "Access Developers Handbook"?
Y2Kingswood,

Yeah, the name makes you think it is some kind of proprietary publication. But you can actually find it in any large bookstore or on-line.

Here are two links:

Amazon.com:
http://www.amazon.com/exec/obidos/search-handle-form/104-7823633-9327157

Barnes and Noble:
http://search.barnesandnoble.com/booksearch/results.asp?WRD=Access+developers+handbook

There are actually two books one is "Desktop" and the other is "Enterprise".
I refered to the "Desktop" version of the book.

Try to buy the version of the book that is specific to your version of Access.
you couldnt possible give me a snippet of code to save me 50 odd dollars?
In Access 2000 (The version I have) it is not a "Snippet".

It's about a hundred lines of code! (Very confusing stuff)

In Access 2002, the printer Object is more "Exposed" to Visual Basic than it was Access 2000 or 97.

But again, I have the 2000 version of the book. I only read through the code once, just to see if I wanted to be bothered. But it turned out not to be worth it at that time. I never used it.

I hear, (but I don't kow for sure) that the code in 2002 and 2003 is a lot simpler (About 10 lines!)
(It probably involves looping through the "Printers" collection and loading the name of each Printer in the combobox)

With that in mind, You could probably do a search on Google and find it! Something like:
Access 2002 Printer Selection Dropdown ComboBox

Or even go down to your local book store and "Read" the code
;)

I do that all the time. I'm cheap too!
:)

(BTW: it is a GREAT book anyway, (well worth the $50) every Access developer has it on their shelf.)

Hope this helps.
Hi Y2Kingswood,

I'm not an expert here and didn't try it, but there is some code here:
http://www.merrioncomputing.com/Programming/PrintStatus.htm
I see PRINTER_INFO_2 has pLocation member.
Merrion who wrote that is also expert on EE, he's active in VB topic area, maybe you should ask there.

Cheers!
Y2Kingswood,

Besides there is probably some "Nerdy" legal reason why we can't just Post Copyrighted, Published code here. (Need permission from the Author, Copyright infringement, Plagerism, Fair Use, .... bla ... bla ...bla

:)
hehe true true. ill try these sugestions out
ASKER CERTIFIED SOLUTION
Avatar of Merrion
Merrion

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial