O'Reilly logo

Access™ 2007 VBA Programmer's Reference by Armen Stein, Geoffrey Griffith, Rob Cooper, Teresa Hennig

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

G.2. AllObjects Collection

Access contains a hidden collection called the AllObjects collection. Chances are you'll never use this collection directly, but it happens to be the parent object of several collections that are commonly used. These collections are:

CollectionDescription
AllDatabaseDiagramsContains an object for each database diagram in a SQL Server database. Applies to ADP files only.
AllFormsContains an object for each form in a database or project file.
AllFunctionsContains an object for each user-defined function in a SQL Server database. Applies to ADP files only.
AllMacrosContains an object for each macro in a database or project file.
AllModulesContains an object for each module in a database or project file.
AllQueriesContains an object for each query in an Access database (ACCDB or MDB).
AllReportsContains an object for each report in a database or project file.
AllStoredProceduresContains an object for each stored procedure in a SQL Server database. Applies to ADP files only.
AllTablesContains an object for each table in a database or project file.
AllViewsContains an object for each view in a SQL Server database. Applies to ADP files only.

Each of these collections contains AccessObject objects that are described in a later section. Because these collections all derive from the AllObjects collection, they have the same properties and methods. For example, take a closer look at the AllForms collection.

As its name implies, the AllForms collection contains an Access ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required