Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Field Referencing- silly question

Status
Not open for further replies.

mrf1xa

Technical User
Jan 14, 2002
366
GB
Hi, sure it's a silly question, I know I've done this before but can't see wood for trees.

I need to reference several field names in a recordset in turn, in a loop. I have the recordset, and using the field name directly works e.g.
str = rst![FieldA]

However, if I try and capture the name of the field first it doesn't e.g.
strName = "FieldA"
str = rst![ & strName & ]

What am I missing please? Thanks!


Nigel
Didn't someone say work is supposed to be fun? They didn't have computers then I guess....
 
Many thanks!

Nigel
Didn't someone say work is supposed to be fun? They didn't have computers then I guess....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top