A
Anna S
Hi
Does anyone know how to use a variable field name to retrieve values from a
recordset
eg
str1 = rst1!FieldName
returns the value in the FieldName field of rst1 as desired but I need to be
able to use the same statement to access values in other fields as well.
strFieldName = "FieldName"
str1 = rst1!strFieldName
What is the correct syntax to use on the second line above if I want str1 to
hold the value in the FieldName field?
Any help would be greatly appreciated.
thanks
Anna
Does anyone know how to use a variable field name to retrieve values from a
recordset
eg
str1 = rst1!FieldName
returns the value in the FieldName field of rst1 as desired but I need to be
able to use the same statement to access values in other fields as well.
strFieldName = "FieldName"
str1 = rst1!strFieldName
What is the correct syntax to use on the second line above if I want str1 to
hold the value in the FieldName field?
Any help would be greatly appreciated.
thanks
Anna