vb 2010 - How do you refer to a form field in a variable.
If I have 10 fields like Me.SpreadAmt1, Me.SpreadAmt2, etc. and I want to blank them (or whatever) without typing each one out..
Dim x As Integer
Dim ha As Object '(just guessing here)
x = 1
For x = 1 To 10
ha = "Me.SpreadAmt" + x.ToString + ".Text"
(ha) = ""
Next
Hope this is clear enough.
Thanks
Simi
If I have 10 fields like Me.SpreadAmt1, Me.SpreadAmt2, etc. and I want to blank them (or whatever) without typing each one out..
Dim x As Integer
Dim ha As Object '(just guessing here)
x = 1
For x = 1 To 10
ha = "Me.SpreadAmt" + x.ToString + ".Text"
(ha) = ""
Next
Hope this is clear enough.
Thanks
Simi