A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

list down printers on a combo box



 
 
Thread Tools Display Modes
  #1  
Old June 11th, 2004, 09:52 PM
Rodolfo Fontes
external usenet poster
 
Posts: n/a
Default list down printers on a combo box

Hi group,

I have a program made on VBA Access and i wanna list down all printers
avaible on windows( locals or on networks) on a combo box.
People has sugest me the following code, but it doesn't work.
#######
Dim Impressora As Printer

For Each Impressora In Printers
CMB_Printer.AddItem Impressora.DeviceName 'Printer.DeviceName
Next
#######

ERROR MESSAGE
"The type wasn't defineid by the user"

Any suggestion?


Thanks,
Rodolfo Fontes


  #2  
Old June 11th, 2004, 10:38 PM
Albert D. Kallal
external usenet poster
 
Posts: n/a
Default list down printers on a combo box

You don't mention what version of ms-access.

If you are using access 2002 (xp) or later, then the printer collection is
built in.

If you are using a earlier version, then you can grab my sample here that
fills a combo box, and lets you set/select the printer of your choice.

http://www.attcanada.net/~kallal.msn.../msaccess.html

--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada

http://www.attcanada.net/~kallal.msn


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:23 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.