Assigning field values to variables
Here's my problem: I have a Dynaset of 1 record whose fields I am
trying to map to variables. This works fine in situations like this:
MyName = MyDynaset!Name
MyAge = MyDynaset!Age
But there are fields in the database that are called Question_1,
Question_2, Question_3 and so on. I want to map them to a string array
called MyQuestion.
I figured a loop would be the most efficient way of retrieving these
values but I can't figure out how to increment the field name. If I do
something like this:
for i = 1 to 10
Mystring = "MyDynaset!Question_" & i
MyQuestion(i) = Mystring
next
The value of MyQuestion(1) = "Question_1" and so on (not the value of
the Question_1 field). How can I increment the name of the field and
use that in my expression?
Russ Posey