Recordset: accessing values using variable for field name

A

Anna S

Hi
I'm wondering if anyone knows how to access the values in different fields
in a recordset using a variable for the field name?
e.g. strFieldName is a variable that holds the name of a field in the
recordset rst1.

strWord = rst1!strFieldName doesn't work, (I didn't seriously think it
would.) How do I make Access recognise strFieldName as a variable in this
statement?

Any help would be greatly appreciated.
Thanks
Anna
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top