Returns the specified Field object.
Set variable = object.Item ( Index ) |
- Index
- Required. A Variant that specifies the name or index of the field.
Index is a variant specifying the field to reference. It can be either the index or the name of the field. For example, if the variable objRecords references a RecordSet that contains a field named "pH" that has an index of 2, the following two lines of code will yield the same result:
Set objField = objRecords.Fields.Item(2)
Set objField = objRecords.Fields.Item("pH")
The Item method is the default method for the Fields collection. Therefore, the following two lines of code will yield the same result:
Set objField = objRecords.Fields.Item("pH")
Set objField = objRecords.Fields("pH")
Set objField = objRecords.Fields.Item(2)
Set objField = objRecords.Fields.Item("pH")
The Item method is the default method for the Fields collection. Therefore, the following two lines of code will yield the same result:
Set objField = objRecords.Fields.Item("pH")
Set objField = objRecords.Fields("pH")