[AccessD] more on printing

Mike and Doris Manning mikedorism at ntelos.net
Fri Feb 28 09:13:22 CST 2003


Your problem is that you haven't actually changed the default printer.  You
need to add the line below just before you open the report.

Set Application.Printer = prt

And it is strongly recommended that you hold the default printer somewhere
so you can easily switch it back to being the default.

Doris Manning
Database Administrator
Hargrove Inc.
www.hargroveinc.com


-----Original Message-----
From: accessd-admin at databaseadvisors.com
[mailto:accessd-admin at databaseadvisors.com] On Behalf Of Susan Harkins
Sent: Friday, February 28, 2003 10:07 AM
To: accessd at databaseadvisors.com
Subject: Re: [AccessD] more on printing


OK, I've done that.

Dim prt As Access.Printer
Dim strReport As String
Dim strPrinter As String
Dim lngPrinter As Long
lngPrinter = cboPrinter
strReport = cboReport
Set prt = Application.Printers(lngPrinter)
prt.Orientation = fraOrientation
prt.Copies = txtCopies
prt.PaperSize = cboPaperSize
DoCmd.OpenReport strReport, acViewNormal

Now, I've installed a few printers, but I only actually have one and the
above always sends to the actual (default) printer, even if I select one of
the others -- I expected an error. In addition, if I do a preview, I don't
see the changes in orientation, etc. that I might have selected. So, I'm
doing something wrong. I'm wondering if Access is smart enough to know I
don't really have that printer connected, and so it just ignores everything
-- but then, I'd still expect an error.

Thanks for your help Doris.
Susan H.

----- Original Message -----
From: "Mike and Doris Manning" <mikedorism at ntelos.net>
To: <accessd at databaseadvisors.com>
Sent: Friday, February 28, 2003 8:37 AM
Subject: RE: [AccessD] more on printing


> Once you change the Application.Printer, you open and print the report
just
> like you normally would.
>
> Doris Manning
> Database Administrator
> Hargrove Inc.
> www.hargroveinc.com
>
>
> -----Original Message-----
> From: accessd-admin at databaseadvisors.com
> [mailto:accessd-admin at databaseadvisors.com] On Behalf Of Susan Harkins
> Sent: Thursday, February 27, 2003 11:34 PM
> To: AccessD at databaseadvisors.com
> Subject: [AccessD] more on printing
>
>
> After setting all the appropriate Printer properties and choosing a 
> nondefault printer, how do you actually print a report? Will the
OpenReport
> method print to the set printer or always print to the default 
> printer?
>
> Susan H.
>
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list