S
scott
Is there a way to create dynamic variables when looping through a recordset?
For example below, after the 1st loop I'd have myVarA1 and myVarB1, after
2nd loop, I'd get myVarA2 and myVarB2.
CODE ***********************************
set objRS = GetMyRecordSet()
i=1
objRS.MoveFirst
Do While Not objRS.EOF
"myVarA" & i = objRS(0)
"myVarB" & i = objRS(1)
i = i + 1
objRS.MoveNext()
Loop
For example below, after the 1st loop I'd have myVarA1 and myVarB1, after
2nd loop, I'd get myVarA2 and myVarB2.
CODE ***********************************
set objRS = GetMyRecordSet()
i=1
objRS.MoveFirst
Do While Not objRS.EOF
"myVarA" & i = objRS(0)
"myVarB" & i = objRS(1)
i = i + 1
objRS.MoveNext()
Loop