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

Getting data from other forms

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
This is probably a dumb question, but I've been having no end of problems here!

I have an MDI program, and I would basically like to load a form containing a text box and a command button which will return the value of the textbox to the calling sub after the user clicks the command button.

No matter how I try this, I have errors saying things like 'Only one MDI form allowed' as well as others.

is there a simple way to just get the value of the textbox?
 
Eww, MDI's...I personlaly havn't worked with these, but you could try storing the value in a temp file ;) Rob
"Programming is like art...It makes me feel like chopping my ear off."

 
You have to make sure the the form you are trying to add is not a MDI. Make it a standard form aor a child of your current MDI. As far as passing the value between the forms, you can delcare a global variable to hold the value or reference the form itself from the MDI. ie:

''Inside the MDI form
Dim sValueOfTextBox as String

sValueOfTextBox = frmMyOtherForm.txtTextBox.Text

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top