GetByNumber Method

Retrieves an object from the collection by its index.

Applies to objects: Connections, Databases, Fields, Indexes, Properties, QueryDefs, Recordsets, Relations, TableDefs, Workspaces.

Syntax

[[Set] RetVal = ] object.GetByNumber (Index)

The GetByNumber method syntax has these parts:

Part Description
object Required. An instance of one of the object collections listed above.
Index Required. An expression that returns a Long value. The index of the object to be retrieved.
RetVal Optional. An instance of an object retrieved from the collection (of Workspace, Connection, Database, TableDef, QueryDef, Relation, Index, Recordset, Field, Property type respectively).

Remarks

If the specified objIndex index is outside the collection range, the following error occurs: "The index is out of range".

Example

.......

 

See Also

Connection Object, Connections Object, Database Object, Databases Object, Field Object, Fields Object, Index Object, Indexes Object, Property Object, Properties Object, QueryDef Object, QueryDefs Object, Recordset Object, Recordsets Object, Relation Object, Relations Object, TableDef Object, TableDefs Object, Workspace Object, Workspaces Object.