Using a variable as a field name

  • Thread starter Thread starter TShirah
  • Start date Start date
T

TShirah

How do I tell Access that I am using a variable to name a
field so I cna change fields on the fly: Example
rsEquip![May] = "somevalue" where rsEquip is a
recordset and May is a field name.

strField = Format(Date,"mmm")
rsEquip![Value of strField] = ....
 
Great! Works like a charm!! Thanks a bunch!
-----Original Message-----
How about ...

rsEquip.Fields(strField)


hth,
--

Cheryl Fischer, MVP Microsoft Access



How do I tell Access that I am using a variable to name a
field so I cna change fields on the fly: Example
rsEquip![May] = "somevalue" where rsEquip is a
recordset and May is a field name.

strField = Format(Date,"mmm")
rsEquip![Value of strField] = ....


.
 
Back
Top