[AccessD] Reference to the Printer object causing fatal error

Mcgillivray, Don [ITS] donald.a.Mcgillivray at mail.sprint.com
Wed Jun 22 15:43:54 CDT 2005


The message box says that Microsoft is sorry for the inconvenience, but
they're not offering to replace all the hair I'm pulling out over this .
. .

Seems simple enough, and it actually was working for a while.  Here's
the code:

Dim prt as Printer

For Each prt in Application.Printers
	Debug.Print prt.DeviceName
Next

Execute the code and it pauses a few seconds, then crashes Access with a
fatal error and the not-so-helpful "Send this to Microsoft . . ."
message box.

Since it was working for a while (and the same code works fine on my
home machine), I have to think that something in my Access or Office
installation got hosed somehow.  Any ideas where to look/what to try?  

Using AccessXP on Windows 2000.

Thanks!

Don




More information about the AccessD mailing list