How to update a recordset with a string variable as the column name
Posted on 2011-03-21
Using Access VBA I have the following code:
For Each i In squares
updating = CStr(i)
currValue = Nz(mrs!)
If currValue = "" Then currValue = 0
mrs!updating = currValue + 1
my recordset is quite large, it has 255 columns. The i value I have here is the column name I am looking for (a number). when I do mrs!updating it doesn't seem to like it. Is there away to do this? I cant explicitly write out each column name because there are so many but the array has what I need to update and how many to add to each column.
Thanks, hope that makes sense.