Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Changing printer using code

0 views
Skip to first unread message

troy white

unread,
Feb 25, 2000, 3:00:00 AM2/25/00
to
I have a report which I need to be able to specify the printer in goes to
during runtime. One is a printer and the other is a fax printer. I am
having a very difficult time with this because Access sends the report to
the default printer. Does anyone have any suggestions on how I can
workaround this problem?


Steve Arbaugh

unread,
Feb 25, 2000, 3:00:00 AM2/25/00
to
Troy:

There are two ways to control the printer. Either change the default
printer at run time or change the printer settings for the report via code
using the prtdevnames and prtdevmode properties. These latter can be a
little trick to work with. If you want a drop in solution for your db, then
stop by our web site and look at our "On the Fly Printing" code / class for
Access. Its easy to import into your db and use.

HTH
--
Steve Arbaugh
ATTAC Consulting Group
http://ourworld.compuserve.com/homepages/attac-cg/acgsoft.htm


"troy white" <tr...@onr.com> wrote in message
news:FFwt4.32$eO4.255...@news.onr.com...

S. Sturgis

unread,
Feb 29, 2000, 3:00:00 AM2/29/00
to
Troy,
Look in the help index under "PrtDevMode property". This should answer your
questions.
Hope this helps,
Steve Sturgis
sstu...@bigfoot.com


troy white wrote in message ...

Steve Arbaugh

unread,
Mar 3, 2000, 3:00:00 AM3/3/00
to
Steve:

Manipulating the prtdevmode alone won't change printers. You have to set
the prtdevnames and prtdevmode at runtime.


"S. Sturgis" <sstu...@bigfoot.com> wrote in message
news:#8H15cxg$GA.315@cppssbbsa05...

Ken Getz

unread,
Mar 3, 2000, 3:00:00 AM3/3/00
to
In article <FFwt4.32$eO4.255...@news.onr.com>, tr...@onr.com says...

> I have a report which I need to be able to specify the printer in goes to
> during runtime. One is a printer and the other is a fax printer. I am
> having a very difficult time with this because Access sends the report to
> the default printer. Does anyone have any suggestions on how I can
> workaround this problem?
>
>
>
You can also change the default printer, print your doc, and then change
it back. There's code available at www.mcwtech.com/downloads.htm that
does this (defaultprt.zip). In addition, Access <x> Developer's Handbook
has all the code you need to actually change the assigned output device
for a report, if that's really what you want to do. The code in the
Access 2000 book is easiest to use -- it's wrapped up in a class, and
all you do is set properties and go. With very minor modifications, you
can use this code in Access 97.

-- Ken

===================================
http://www.mcwtech.com
Stop by http://www.developershandbook.com
if you have any of the Developer's Handbooks
co-authored by MCW Technologies folks.
Updates, info, and registration available.


0 new messages