Using the Field Object
When assigning values to fields in a recordset, you can specify simply the recordset name, an exclamation point, and the FieldName to reference the field, or you can reference the field by number.
rs.Open "Course", "Provider=PervasiveOLEDB;Data Source=Demodata", adOpenDynamic, adLockBatchOptimistic, adCmdTableDirect
rs.Fields(8).Value = "Sacramento"
rs!State = "CA"
rs.UpdateBatch
rs.Close
You can also use other properties of the Field object to find out more about the data stored there. For example, you can find the length of the data in the fields using ActualSize, the OriginalValue before any change was made in this instance of the recordset, and the Type of data (useful for determining how to compare the value in the field to another field or a value in memory).