Item Property [Access 2003 VBA Language Reference]

The Item property returns a specific member of a collection either by position or by index. This property is read-only for all objects in the Applies To list except the ObjectFrame object, which is read/write.


expression Required. An expression that returns one of the above objects.

Index  Required Variant. An expression that specifies the position of a member of the collection referred to by the expression argument. If a numeric expression, the index argument must be a number from 0 to the value of the collection's Count property minus 1. If a string expression, the index argument must be the name of a member of the collection.


The Item property is available only by using Visual Basic .

If the value provided for the index argument doesn't match any existing member of the collection, an error occurs.

The Item property is the default member of a collection, so you don't have to specify it explicitly. For example, the following two lines of code are equivalent:

Debug.Print Modules(0)

Debug.Print Modules.Item(0)

Applies to | AccessObjectProperties Collection | AdditionalData Object | AllDataAccessPages Collection | AllDatabaseDiagrams Collection | AllForms Collection | AllFunctions Collection | AllMacros Collection | AllModules Collection | AllQueries Collection | AllReports Collection | AllStoredProcedures Collection | AllTables Collection | AllViews Collection | Controls Collection | DataAccessPages Collection | DependencyObjects Collection | FormatConditions Collection | Forms Collection | Modules Collection | ObjectFrame Object | Pages Collection | Printers Collection | Properties Collection | Reports Collection | SmartTagActions Collection | SmartTagProperties Collection | SmartTags Collection

See Also | Application Property | Count Property | Name Property | OLEClass Property | OLEType Property | Parent Property | References Collection | SourceItem Property | SourceObject Property