By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,084 Members | 1,956 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,084 IT Pros & Developers. It's quick & easy.

PrnAdmin issue

P: 2
Hello, I'm having a very annoying issue when trying to use the Printmaster class and Drivers method from the prnadmin library in VBA (Access). When I use the method in a W2K3 environment it worked perfectly, allowing me to enumerate the specified server's print drivers with no problem. But as soon as I tried running the form in an XP environment I started receiving the error:

Runtime Error: '-2147024774 (8007007a)'
Message: The data area passed to a system call is too small

If anyone has encountered this error and could offer some advice on a resoultion I'd be very greatful. Thanks in advance

Scott
Mar 15 '07 #1
Share this Question
Share on Google+
5 Replies


100+
P: 1,646
I have moved your thread to the access forum
Mar 15 '07 #2

nico5038
Expert 2.5K+
P: 3,072
Printers in Access before version A2002/2003 are a real pain.
All I have found is:
http://www.mvps.org/access/reports/rpt0009.htm
but best would be to use A2003....

Nic;o)
Mar 17 '07 #3

P: 2
Thanks for your response but I am using A2003. Do you happen to know how I can enumerate drivers on a remote server from within VBA code. Thanks
Mar 22 '07 #4

ADezii
Expert 5K+
P: 8,627
Thanks for your response but I am using A2003. Do you happen to know how I can enumerate drivers on a remote server from within VBA code. Thanks
Expand|Select|Wrap|Line Numbers
  1. Dim prn As Printer
  2.  
  3. For Each prn In Application.Printers
  4.   Debug.Print "Name: " & prn.DeviceName & vbCrLf & "Driver: " & prn.DriverName & _
  5.                vbCrLf & "Port: " & prn.Port & vbCrLf
  6. Next
Typical Output:
Expand|Select|Wrap|Line Numbers
  1. Name: Microsoft Office Document Image Writer
  2. Driver: winspool
  3. Port: USB001
  4.  
  5. Name: Dell Laser Printer M5200
  6. Driver: winspool
  7. Port: USB001
  8.  
  9. Name: CutePDF Writer
  10. Driver: winspool
  11. Port: USB001
Mar 22 '07 #5

nico5038
Expert 2.5K+
P: 3,072
There's an excellent description in the Access Cookbook:
www.oreilly.com/catalog/accesscook2/

Check out the sample databases from:
examples.oreilly.com/accesscook/CDROM/chap05.zip

Nic;o)
Mar 22 '07 #6

Post your reply

Sign in to post your reply or Sign up for a free account.