Link to home
Start Free TrialLog in
Avatar of ameybusiness
ameybusinessFlag for United States of America

asked on

Passing texbox values between forms

I am developing an application that when you click on an icon on the form, a text box populates another form which has a larger version of the same text box with a larger font to allow ease of editing.  After the editing is completed on the expanded text box, I want to pass the new text back to the original text box.  I can do it by hard coding the reference to the original text box in the expanded text box form but I would like to reuse the expanded textbox form on other text boxes and other forms within the application.  Any help greatly appreciated.
Avatar of mankowitz
mankowitz
Flag of United States of America image

Essentially, what you want to do is create a new form with a single, large text box that can be called up whenever you need it.

Add a handler for every textbox on your original form. (use the Enter event . When the user enters that text box, have it call up the larger text box at the same location as the current textbox. When the user leaves the new text box, make it invisible and copy the text property into the original text box.
Avatar of ameybusiness

ASKER

Thansk for the help.  
I got it working for one text box copying the text back to the original text box when I call the form_closing event.  My problem is I would like to re-create this for all text boxes on multiple forms.  Is there a way I can pass the form name and textbox name to the expanded form so that I can reference them when passing back the changed text - or is tehre an easier way to do this?
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Worked perfectly.  I copied in to a function that I use in all of my forms.