Hey everyone,
Lets say I have a large number of text boxes on a form. Each has a unique name, and for each there is a function with the same name in a module. When the form is processed, the function corresponding to a text box is only called if the text box is non-empty. Currently, I have a giant if-else structure for calling these functions. This is a huge pain if I want to add a function. Is there a way to simply take the name of a textbox, as a string, and call the function indirectly?
This is what I want to do:
For each control in myform
if(it is a text box)then
grab name
call function
endif
next
Can this be done?
Lets say I have a large number of text boxes on a form. Each has a unique name, and for each there is a function with the same name in a module. When the form is processed, the function corresponding to a text box is only called if the text box is non-empty. Currently, I have a giant if-else structure for calling these functions. This is a huge pain if I want to add a function. Is there a way to simply take the name of a textbox, as a string, and call the function indirectly?
This is what I want to do:
For each control in myform
if(it is a text box)then
grab name
call function
endif
next
Can this be done?