If in the module code, i have to refer to a textfield located on a form, how would i do that.
for example, a form is called:
my_form
It has a textfield , TextBox0
In the module code, i have to set value of TextBox0.... I cant do Me.TextBox0
I have tried doing my_form.TextBox 0 - but doth the ways seems not to work
help!
thanks
Simplest way would be to have your code in the forms module, rather than a global module. That way, the code can refer directly to TextBox0
If the code has to be global (because it is called from many forms) then pass TextBox0 as a variable to the code, byRef, so it can be changed.
i.e.
[code=vb]
sub mycode (byRef textbox as string)
[/code]
Comment