How to access a control on the calling form.

thegreenduck

New member
Joined
Aug 7, 2007
Messages
1
Programming Experience
3-5
This problem seems like it should be tiny, but it's stumping me enough to make a post about it.

Basically, I have form1 which calls form2 which in turn calls a form3. Form3 calculates a value and needs to update a textbox on form1.

So, the layout goes:
form1--->form2--->form3

I can have any number of instances of form1 pulled up at once, so I need to certain that form3 will correspond back to the proper instance of form 1.

So, how can I access form1.textbox1 from form3? Is there a property like "Calling Form" or anything like that?

In C++, I probably would have just passed a pointer through the functions, but I'm a little lost in vb. :(
 
If form1 is opening form2 which opens form3 you can set both form2 and form3 to be children of form1 and refer to it as parentform this way you will not get confused by multiple instances of the form are opened up.
 
Back
Top