[Access] How to specify printer for PrintOut method?

spidermman

Registered User.
Local time
Today, 14:05
Joined
Sep 17, 2008
Messages
21
I am using Access 97 to print out the form.
I would like to have one command button whereby it can specify a canon printer to print the form and another command to use Microsoft office document image writer to save the same form as an image.

Code:
[FONT=Times New Roman][SIZE=3]Private Sub Print_Click()[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]‘using canon printer to print the form[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]Docmd.PrintOut[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]End Sub[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]Private Sub Save_Click()[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]‘using Microsoft office document image writer to save the form as a .mdi file[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]Docmd.PrintOut’[/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3] [/SIZE][/FONT]
[FONT=Times New Roman][SIZE=3]End Sub[/SIZE][/FONT]


Is there a way to specify which printer to print the form?
thanks.
 
you cant easily manage printers easily in A97

easiest way is to open in print preview, then manually select the printer

or have 2 versions of the print, one linked ot the specific printer, and one uaing the default
 
This link explains how to progammatically change the printer which you are printing to.

hth
Chris
 
Stopher

i didnt think A97 had a printers object that made this easy to do, hence my answer

The code on the reference refers to Access 2002 and later
 
Stopher

i didnt think A97 had a printers object that made this easy to do, hence my answer

The code on the reference refers to Access 2002 and later
Good point Gemma.

There's plenty of code out there for changing the printer in '97. This link suggests a simple but basic solution.

If you just need to do this for one specific form/report then I'd go with Gemma's suggestion.

Chris
 
gemma,

have 2 versions of the print, one linked to the specific printer, and one using the default

how do u link to the specific printer?

For A97, there is no printers object and cannot dim variable as printer.

thanks.
 

Users who are viewing this thread

Back
Top Bottom