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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I? : Use a variable in place of a method or property. 1

Status
Not open for further replies.

thefarg

Programmer
Jan 25, 2012
94
NZ
Hi. I am trying to replace
Code:
rst!(varMyvariable) = strSoundName
varMyvariable = "[Event" & MyCloseObject.[Tag] & "]"
where rst is a recordset. I have tried concatenating differently but to no avail. How do I do this correctly? I have a number of Fields, Event1, Event2, Event3 etc. MyCloseObject.[Tag] is a number1-20, I want concatenated to end up with the field name, i.e Event1, Event2 etc. Any ideas?
 
Replace this:
rst!(varMyvariable) = strSoundName
with this:
rst.Fields(varMyvariable) = strSoundName

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top