J
Jim
Hello:
I have an Access database with a table with sequentially numbered
fields (e.g., Q10_1, Q10_2, Q10_3, etc.
What I want to do is cycle through the variables to set them to
values. What I want to do is
___________________________________________
For MaxVariables = 1 To 11 Step 1
SubString1 = "rst!Q10_" + CStr(MaxVariables)
MsgBox (SubString1)
rst.Edit
Eval(SubString1) = 999
rst.Update
Next MaxVariables
____________________________________________
Unfortunately, the Eval function doesn't do what I want - what I need
is a way to put the variable name IN a variable and use it. I'm sure
there's a way to do this, but I just can't find it.
Any help appreciated!
Jim
I have an Access database with a table with sequentially numbered
fields (e.g., Q10_1, Q10_2, Q10_3, etc.
What I want to do is cycle through the variables to set them to
values. What I want to do is
___________________________________________
For MaxVariables = 1 To 11 Step 1
SubString1 = "rst!Q10_" + CStr(MaxVariables)
MsgBox (SubString1)
rst.Edit
Eval(SubString1) = 999
rst.Update
Next MaxVariables
____________________________________________
Unfortunately, the Eval function doesn't do what I want - what I need
is a way to put the variable name IN a variable and use it. I'm sure
there's a way to do this, but I just can't find it.
Any help appreciated!
Jim