Skip to content

Latest commit

 

History

History
40 lines (25 loc) · 1.22 KB

Access.Form.Pages.md

File metadata and controls

40 lines (25 loc) · 1.22 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Form.Pages property (Access)
vbaac10.chm13411
vbaac10.chm13411
Access.Form.Pages
9494fb79-d080-e2cb-6b55-8194ecd81e9b
03/06/2019
medium

Form.Pages property (Access)

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

Syntax

expression.Pages

expression A variable that represents a Form object.

Remarks

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 expression Prints
=Page A 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.
=Pages The total number of pages in the form (for example, 5).

[!includeSupport and feedback]