Pages object (Access)
The Pages collection contains all Page objects in a tab control.
The Pages collection is a special kind of Controls collection belonging to the tab control. It contains Page objects, which are controls. The Pages collection differs from a typical Controls collection in that you can add and remove Page objects by using methods of the Pages collection.
To add a new Page object to the Pages collection from Visual Basic, use the Add method. To remove an existing Page object, use the Remove method. To count the number of Page objects in the Pages collection, use the Count property.
You can also use the CreateControl method to add a Page object to the Pages collection of a tab control. To do this, you must specify the name of the tab control for the Parent argument of the CreateControl function. The ControlType property constant for a Page object is acPage.
You can enumerate through the Pages collection by using the For Each...Next statement.
Individual Page objects in the Pages collection are indexed beginning with zero.
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.