Returns the highest numbered page used in a form.

Syntax

<oRef>.pageCount( )

<oRef>

An object reference to the form you want to check.

Property of

Form, SubForm

Description

pageCount( ) returns the highest pageno used by the controls in the form. (There are actually no pages or page objects in a form.)

In most cases, you know how many pages there are in a form because you decide on which pages to place the form’s controls. Use pageCount( ) if you do not want to keep track of the highest page manually, or if the form creates objects on different pages dynamically.