So I have like 10 text boxes on a form that are actually used for display not entry. They are are named like txt_001_Name, txt_002_Title, etc..what kind of loop is used for this.
I was wondering what kind of VBA would I use to actually loop through the names of the text boxes. So if I was to debug.print it would look like:
txt_001_Title
txt_002_Title
txt_003_Title
probably pretty simple to do....although the more reason i should learn how!
EDIT: sooo I should have been more descriptive about this....apologies.
because of the above naming covention, I am looking to iterate through these text boxes so that I can preform something with each. So what each of these 10 text boxes actually represent is numeric values that each have a sql statement behind them on the forms load event. I also have another set of ten that hold numeric values that are much more static, and finally another ten that use an expression to simply divide each of the first ten, against the relative "second" ten, and the value ends up in the relative 3. So bascially it ends up looking like a dashboard table.
'first ten' 'second ten' 'resulting ten'
---------------------------------------------------
txt_001_value txt_001_calc txt_001_result
txt_002_value txt_002_calc txt_002_result
etc.
So I actually wanting to use this for the 'resulting' text boxes. I want to loop through the first ten, preform the little easy calc of:
me.txt_001_result = me.txt_001_value / me.txt_001_calc
all the naming conventions "match up", so I can manually type out the 10 lines of the above for this, but i am sure there is a better way (loop through this), and I should probably learn it.
Thanks Justin