OrdinalPosition Property

See AlsovbproOrdinalPositionSee

Applies To

Field objectKU5EEE.


Indicates the numeric order of a Field object in the Fields collection of a TableDef.  Not available at design time; read-only at run time.


tabledef.Fields( fieldname ).OrdinalPosition


Each Field in the Fields collection of a TableDef has a unique value in the OrdinalPosition property.  The first Field appended to the collection is in the first position (0).  The second Field is in OrdinalPosition 1, and so on.

To specify a Field in a collection, you can use either the value of the Name property for the Field, or the value of the OrdinalPosition property.  For example, in the BIBLIO.MDB database, the table named "Publishers" has a field named "PubID" in the ordinal position of 0.  To print the current value of the Field, you can use either the Name of the Field or the OrdinalPosition of the Field in the collection.  For example, these statements print identical results:

Print Data1.Recordset.Fields("PubID")
Print Data1.Recordset.Fields(0)


Data Type