Share via


AllDataAccessPages Collection

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

                                   




The AllDataAccessPages collection contains an AccessObject object for each data access page in the CurrentProject or CodeProject object.

NoteAlthough a Microsoft Access project (.adp) or Microsoft Access database (.mdb) can appear to contain data access pages, these pages are actually stored in files that are external to the project or database.

Remarks

The CurrentProject or CodeProject object has an AllDataAccessPages collection containing AccessObject objects that describe instances of all data access pages. For example, you can enumerate the AllDataAccessPages collection in Visual Basic to set or return the values of properties of individual AccessObject objects in the collection.

Tip   The For Each...Next statement is useful for enumerating a collection.

You can refer to an individual AccessObject object in the AllDataAccessPages collection either by referring to the item by name, or by referring to its index within the collection. If you want to refer to a specific data access page in the AllDataAccessPages collection, it's better to refer to the item by name because the index may change.

The AllDataAccessPages collection is indexed beginning with zero. If you refer to a data access page by its index, the first data access page is AllDataAccessPages(0), the second data access page is AllDataAccessPages(1), and so on.

Note   To list all open data access pages in the database, use the IsLoaded property of each AccessObject object in the AllDataAccessPages collection. 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 an AccessObject object from the AllDataAccessPages collection.