PrintOut


Prints all or part of the active object’s data.

Syntax

DoCmd.PrintOut [PrintRange][, PageFrom][, PageTo][,    PrintQuality][, Copies][, CollateCopies]

with the following parameters:

PrintRange

One of the following AcPrintRange constants designating the range to be printed: acPages (print a range of pages), acPrintAll (print the entire object’s data, the default value), and acSelection (print selected data).

PageFrom

The starting page to print if PrintRange equals acPages.

PageTo

The ending page to print if PrintRange equals acPages.

PrintQuality

An AcPrintQuality constant indicating the desired print quality. Possible values are acDraft, acHigh (the default), acLow, and acMedium.

Copies

A Variant Integer that determines how many copies are to print. The default is 1.

CollateCopies

A Boolean that determines whether copies are collated. The default is True.

Example

See the example for the OpenReport method.

Comments

  • The PrintOut method simply prints; it does not display a Print dialog box.

  • You can print datasheets, reports, forms, Data Access Pages, and modules.

  • Typically, you’d want to call the SelectObject method of the DoCmd object to select an object before calling the PrintOut method.




Access VBA Programming
Microsoft Access VBA Programming for the Absolute Beginner
ISBN: 1598633937
EAN: 2147483647
Year: 2006
Pages: 214
Authors: Michael Vine

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net