Table of contents
TOC
Collapse the table of content
Expand the table of content

DoCmd.PrintOut Method (Access)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

The PrintOut method carries out the PrintOut action in Visual Basic.

Syntax

expression. PrintOut( ** PrintRange, ** PageFrom, ** PageTo, ** PrintQuality, ** Copies, ** CollateCopies )

expression A variable that represents a DoCmd object.

Parameters

NameRequired/OptionalData TypeDescription
PrintRangeOptionalAcPrintRangeA AcPrintRange constant that specifies the range to print. The default value is acPrintAll.
PageFromOptionalVariantThe first page to print. A numeric expression that's a valid page number in the active form or datasheet. This argument is required if you specify acPages for the printrange argument.
PageToOptionalVariantThe last page to print. A numeric expression that's a valid page number in the active form or datasheet. This argument is required if you specify acPages for the printrange argument.
PrintQualityOptionalAcPrintQualityA AcPrintQuality constant that specifies the print quality. the default value is acHigh.
CopiesOptionalVariantThe number of copies to print. If you leave this argument blank, the default (1) is assumed.
CollateCopiesOptionalVariantUse True (?1) to collate copies and False (0) to print without collating. If you leave this argument blank, the default ( True ) is assumed.

Remarks

You can use the PrintOut action to print the active object in the open database. You can print datasheets, reports, forms, data access pages, and modules.

Example

The following example prints two collated copies of the first four pages of the active form or datasheet:

DoCmd.PrintOut acPages, 1, 4, , 2

See also

Concepts

DoCmd Object

© 2018 Microsoft