Page.PageIndex property (Access)

Use the PageIndex property to specify or determine the position of a Page object within a Pages collection. The PageIndex property specifies the order in which the pages on a tab control appear. Read/write Integer.

Syntax

expression.PageIndex

expression A variable that represents a Page object.

Remarks

The PageIndex property setting is an Integer value between 0 and the Pages collection Count property setting minus 1.

The PageIndex property can be set in any view.

Changing the value of the PageIndex property changes the location of a Page object in the Pages collection and visually changes the order of pages on a tab control.

Example

The following example moves the page named "Notes" on the tab control named "Information" on the Order Entry form to the first page.

Forms("Order Entry").Controls("Information").Pages("Notes").PageIndex = 0 
 

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.