The DataAccessPages collection contains all of the data access pages that are currently open in a Microsoft Access project (.adp) or Access database (.mdb).
Remarks
Use the DataAccessPages collection in Visual Basic or in an expression to refer to data access pages that are currently open. For example, you can enumerate the DataAccessPages collection to set or return the values of properties of individual data access pages in the collection.
Tip The For Each...Next statement is useful for enumerating a collection.
You can refer to an individual DataAccessPage object in the DataAccessPages collection either by referring to the data access page by name, or by referring to its index within the collection. If you want to refer to a specific data access page in the DataAccessPages collection, it's better to refer to the data access page by name because a data access page's collection index may change.
The DataAccessPages collection is indexed beginning with zero. If you refer to a data access page by its index, the first data access page opened is DataAccessPages(0), the second form opened is DataAccessPages(1), and so on. If you opened Page1 and then opened Page2, Page2 would be referenced in the DataAccessPages collection by its index as DataAccessPages(1). If you then closed Page1, Page2 would be referenced in the DataAccessPages collection by its index as DataAccessPages(0).
Note To list all data access pages in the database, whether open or closed, enumerate the AllDataAccessPages collection of the CurrentProject object. You can then use the Name property of each individual AccessObject object to return the name of a data access page.
You can't add or delete a DataAccessPage object from the DataAccessPages collection.