Returns a specific member of a collection by name or ordinal number.
Applies To
Errors, Fields, Parameters, Properties
Required Files
msado15.dll
VC: adoint.h, adoid.h
Syntax
collection.Item (Index)
| Index | A Variant that evaluates either to the name or to the ordinal number of an object in a collection. |
Return Values
Returns an object reference.
Remarks
Use the Item method to return a specific object in a collection. If the method cannot find an object in the collection corresponding to the Index argument, an error occurs. Also, some collections don't support named objects; for these collections, you must use ordinal number references.
The Item method is the default method for all collections; therefore, the following syntax forms are interchangeable:
collection.Item (Index)
collectio (Index)
Note The Item method may not be exposed in all programming environments. If it is not available, you must use the implicit, abbreviated syntax as shown in the second example, above.
Examples
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.