Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Accessing anyform.subform from another form 1

Status
Not open for further replies.

jmoby

Programmer
Jun 26, 2006
4
US
I am trying to access a FormA.subform from FormB. The tricky part is, that I don't know what FormA is. I do know what subform is named though. and I do know that FormB pops up from FormA.
I am trying to use something like Screen.PreviousControl.Application.Screen.ActiveForm.myTextBox to get the value of the text box.
This doesn't work. I think I am on the right track? I hope there is a better way to do this.

Thanks!
J
 
FormB pops up from FormA
You may consider playing with OpenArgs.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
when using OpenArgs I get the form name passed over as a String,as myStringForm.
I need to access Forms!myStringForm.subform in some way. How can I get myStringForm interpreted properly?

Thanks!
J
 
Forms(myStringForm)!subform.Form!myTextBox

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top