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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating a parent form from a child without using parent nam 1

Status
Not open for further replies.

nightsurfer1

Programmer
Jul 23, 2003
5
Hi, What I'm trying to do is create an report entry screen for a report that lets the person enter a beginning and ending values in order to constrain the report. If the user clicks a button I open a lookup form with a drop down list. The user will click a record and the click event for the lookup has code that updates the report entry screen. This all works fine but I find myself having to hardcode the name of the report entry screen form
(entryscreenformname.sometextbox.text = value from lookup list). I would like to only create this lookup form once but be able to use it for several report entry screens. I need to find a way to update the parent or calling form of the lookup list without hardcoding the name of the report entry form. I'd like to do something like (parent.sometextbox.text = value from lookup list)

Thanks nightsurfer1
 
Create your own procedure with parmameters to hold the form and textbox you need to update.

IE:

Code:
Private Sub (TargetForm as Form, TargetText as TextBox)

Then instead of hardcoding the names you can use TargetForm or TargetText to set the values.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top