Hello all,
I have a question that seems quite simple but has confused me. I made a button that asks users for data and then analyzes it, and places the results in a textbox. The code is fairly complex, and since there are 30 such textboxes, I decided to make a function for it. For each Call Function command I write, I also send the name of the textbox where the value will ultimately be stored, as a string.
Without the function, it's easy. For one textbox I just put in the code:
Code:
me.Textbox.value=calculatedvariable
With the function, it seems much harder. I tried
Code:
me.variablerepresentingtextbox.value=functionvariable
I know that the function is set up correctly, because when I view both the variables, I get the right answers. When I substitute the original Textbox back into the function instead of variablerepresentingtextbox, it works. But I can't get the function variable to be used as the name of the textbox and always get an error. Is there some command to turn the value of the variable into a reference to a textbox?
Thanks!
-Dave