Table of contents
TOC
Collapse the table of content
Expand the table of content

CodeData Object (Access)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

The CodeData object refers to objects stored within the code database by the source (server) application.

Remarks

The CodeData object has several collections that contain specific object types within the code database. The following table lists the name of each collection defined by the database and the types of objects it contains.

CollectionsObject type**Available in Access database **Available in Access Project (.adp)
AllTablesAll tablesYesYes
AllFunctionsAll functionsNoYes
AllQueriesAll queriesYesYes
AllViewsAll viewsNoYes
AllStoredProceduresAll stored proceduresNoYes
AllDatabaseDiagramsAll database diagramsNoYes

Note The collections in the preceding table contain all of the respective objects in the database regardless if they are opened or closed.

For example, an AccessObject representing a table is a member of the AllTables collection, which is a collection of AccessObject objects within the current database. Within the AllTables collection, individual tables are indexed beginning with zero. You can refer to an individual AccessObject object in the AllTables collection either by referring to the table by name, or by referring to its index within the collection. If you want to refer to a specific item in the AllTables collection, it's better to refer to it by name because the item's index may change. If the object name includes a space, the name must be surrounded by brackets ([ ]).

SyntaxExample
AllTables ! tablenameAllTables!OrderTable
AllTables ![ table name]AllTables![Order Table]
AllTables (" tablename")AllTables("OrderTable")
AllTables ( index)AllTables(0)

Properties

Name
AllDatabaseDiagrams
AllFunctions
AllQueries
AllStoredProcedures
AllTables
AllViews

See also

Other resources

Access Object Model Reference

© 2017 Microsoft