Fields Collection
Description
A Fields collection contains all stored Field objects of an Index, QueryDef, Recordset, Relation, or TableDef object.
Remarks
The Fields collections of the Index, QueryDef, Relation, and TableDef objects contain the specifications for the fields those objects represent. The Fields collection of a Recordset object represents the Field objects in a row of data, or in a record. You use the Field objects in a Recordset object to read and to set values for the fields in the current record of the Recordset object.
To refer to a Field object in a collection by its ordinal number or by its Name property setting, use any of the following syntax forms:
Fields(0)
Fields("name")
Fields![name]
With the same syntax forms, you can also refer to the Value property of a Field object that you create and append to a Fields collection. The context of the field reference will determine whether you are referring to the Field object or the Value property of the Field object.
Properties
Count property.
Methods
Append method, Delete method, Refresh method.
Specifics (Microsoft Access)
See the Field object specifics (Microsoft Access).
Example
See the Field object example.
Example (Microsoft Access)
See the Field object example (Microsoft Access).