XMan said:
I know how to get value of a record in record set by RecordSet(index). Is
there a way to get by column name like RecordSet("ColumnName"")?
As far as I know, a record has many values, so your
RecordSet(index) does not return the value os a record. It
will return the value of the field with that index. The
default collection of a DAO recordset object is the FIelds
collection, so what you wrote is the equivalent of:
Recordset.Fields(index)
If you want to refer to the field by name, then you can use
the name of the field as the index:
Recordset.Fields("ColumnName")
which, as you presumed, can be abbreviated as:
Recordset("ColumnName")
or the alternate syntax:
Recordset!ColumnName