Changing printer in code

R

ruby

Using Access2000. Running an Access db on a scheduling
server with no user interface that generates reports. I
want to automatically print them to a user's networked
printer (not the default printer on the machine where the
db is running). I've been looking into PrtDevMode and
PrtDevNames properties, but now I think I learned that I
can't "Add a printer" in code. Anyone know how to do
this? Thanks.
 
S

SA

Ruby:

1.) The target printer must be set up on the server running the db; you
don't want to add it at run time.

The challenge will be that if the server is unattended, (i.e. there's no one
logged on,) then normally an NT / 2000 / 2003 server will not have any
printers established in that situation; available printers are user
specific. To run in unattended mode you must establish printers for the
..Default user. To do that, see the following Knowledgebase article:
http://support.microsoft.com/defaul...port/kb/articles/Q184/2/91.asp&NoWebContent=1

2.) Once you get printers established for the .Default User, including the
target network printer, then you have to change the default at run time to
the target printer when Access runs (maybe by a scheduler) using an Access
function, then when the reports are done, set the default back. You might
want to look at our "On the Fly Printing" code / classes which make this a
snap to do once the printer is installed on the server.

HTH
 
R

ruby

Thanks, Steve. I actually found your website before I
received your e-mail and have downloaded the demo.

Ruby
 

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