Mavila
01-28-2013, 07:56 PM
I've tried:
MyRecordset.Fields![strVar]
MyRecordset.Fields!['strVar']
MyRecordset.Fields!['" & strVar & "']
MyRecordset.Fields(strVar)
None of those work. I get, "Item cannot be found in the collection corresponding to the requested name or ordinal" which I'm assuming means that it's not reading the variable as a field name. The value of the variable is correct, so my syntax is off I think.
Anyone got the key to this?
MyRecordset.Fields![strVar]
MyRecordset.Fields!['strVar']
MyRecordset.Fields!['" & strVar & "']
MyRecordset.Fields(strVar)
None of those work. I get, "Item cannot be found in the collection corresponding to the requested name or ordinal" which I'm assuming means that it's not reading the variable as a field name. The value of the variable is correct, so my syntax is off I think.
Anyone got the key to this?