Page.PageIndex Property

Access Developer Reference

You can 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.

Visual Basic for Applications
  Forms("Order Entry").Controls("Information").Pages("Notes").PageIndex = 0
 

See Also