check for a printer

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
 
S

SA

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top