>
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.
You can refer to the Value property of a Field object that you create and append to a Fields collection by its Name property setting using the following syntax:
Fields("name")
Fields that have names with embedded spaces must be delimited with brackets ([ ]) or enclosed in double quotation marks (" "), using either of the following syntax forms:
Fields("long name")
You can refer to the Value property of a Field object that you create and append to a Fields collection by its position in the Fields collection using this syntax:
Fields(0)
Properties
Count Property.
Methods
Append Method, Delete Method, Refresh Method.
See Also
Appendix, "Data Access Object Hierarchy."
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).