check for a printer

  • Thread starter Thread starter LGarcia
  • Start date Start date
L

LGarcia

Hi all,
I have an application that creates a few reports that run from a macro.
These reports open in print preview.
Some of my users use my app on a laptop and don't have any printers
installed. This causes an error. Is there a way to check to see if a printer
is intalled? Using AccessXP.
TIA,
LGarcia
 
Yes, with Xp you can. The Access application object has a printers
collection. If the count of that collection is 0 then no printers. (E.g.
?Application.Printers.Count in the immediate window). With Access 2000 and
below you need to use api calls to determine whether a printer is intalled.
Our On the Fly Printing does that easily.

Of course even when the laptop will never connect to a printer, there's
nothing to installing a single driver and setting it as the default, or one
of the built in drivers in Xp like a plain vanilla HP Laser Jet 4 or a PDF
driver like Win2PDF (www.daneprairie.com). That's all it takes to solve the
problem.
 
Back
Top