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

Form.Pages Property (Access)

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

You can use the Pages property to return information needed to print page numbers in a form. Read/write Integer.


expression. Pages

expression A variable that represents a Form object.


This property is only available in Print Preview or when printing.

To refer to the Pages property in a macro or Visual Basic, the form or report must include a text box whose ControlSource property is set to an expression that uses Pages. For example, you can use the following expressions as the ControlSource property setting for a text box in a page footer.

This expressionPrints
=PageA page number (for example, 1, 2, 3) in the page footer.
="Page " &; Page &; " of " &; Pages"Page n of nn " (for example, Page 1 of 5, Page 2 of 5) in the page footer.
=PagesThe total number pages in the form (for example, 5).

See also


Form Object

© 2017 Microsoft