kwennerberg
New member
- Local time
- Today, 14:12
- Joined
- Jan 11, 2011
- Messages
- 2
In a DO Loop how does one refer to a text field that ends with a sequential number each time through the loop? How do I do the syntax for the line below which begins with "Months_String"?
For example
Dim Months_String as String
MyNbr = 64
Do Until MyNbr = 70
Months_String = Months_String & me.month64
MyNbr = MyNbr + 2
Loop
'here is issue: First time through the loop the text box referred on the form is month64, next time through the loop it is month66, month68, then month70. It could be up to 10 times through the loop. I would like to use MyNbr in the each time through the loop to alter the text box name referred to.
For example
Dim Months_String as String
MyNbr = 64
Do Until MyNbr = 70
Months_String = Months_String & me.month64
MyNbr = MyNbr + 2
Loop
'here is issue: First time through the loop the text box referred on the form is month64, next time through the loop it is month66, month68, then month70. It could be up to 10 times through the loop. I would like to use MyNbr in the each time through the loop to alter the text box name referred to.