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!

Dynamically set field in recordset

Status
Not open for further replies.

drgsolutions

IS-IT--Management
May 23, 2007
7
US
I am attempting to dynamically set the field I wish to update at run time.

This is my code (DAO)

rs.Edit
rs(parameter)
rs.Update

I have tried using [] () ! and . characters to now avail. Anyone know how to pass a string character into a recordset object and have it recognized as a field name?

Thanks a bunch
 
Code:
rs.Edit
rs([COLOR=red][b]"Fieldname"[/b][/color])
rs.Update
 
I'm not sure what's meant by dynamically setting the field or what you're trying to do here exactly.

Specifically, what're you trying to do?

This may be some of what you're looking for:

rs.Fields("Field Name")

-Neema
 
Actually, sorry. What pwise has is correct. rs.Fields("Field Name") is for referencing an excel sheet.

-Neema
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top