MrCancelled
Programmer
Hello,
I'm having a problem referencing a series of form controls using a For Next loop using Access/VB.
I have a series of text entry fields all named relatively, the same. The only difference between their names is a number indicating their sequence.
For example:
TextEntry1Name
TextEntry2Name
TextEntry3Name
and so on...
I'm trying to do something like:
for z = 1 to 10
MyForm!TextEntry & z & Name.value = Value(z)
next z
And setting all the fields....
But I'm having a problem determining the correct syntax in order to achieve the above.
Can anyone help me out?
I'm having a problem referencing a series of form controls using a For Next loop using Access/VB.
I have a series of text entry fields all named relatively, the same. The only difference between their names is a number indicating their sequence.
For example:
TextEntry1Name
TextEntry2Name
TextEntry3Name
and so on...
I'm trying to do something like:
for z = 1 to 10
MyForm!TextEntry & z & Name.value = Value(z)
next z
And setting all the fields....
But I'm having a problem determining the correct syntax in order to achieve the above.
Can anyone help me out?