I have a text box on one form for which I want to use to bring up values on a new form when it is loaded.
Therefore: The "string" value in txtCompany on form1 will need to be passed to form2 when it is loaded.
I have this as the code under the load event for form2:
Form1 frm1 = new Form1();
string Company = frm1.txtCompany.Text.ToString();
This compiles without a problem, however a blank string gets passed when form2 loads instead of the string from the textbox.
Can anyone help?
Thanks in advance,
Smitty
Therefore: The "string" value in txtCompany on form1 will need to be passed to form2 when it is loaded.
I have this as the code under the load event for form2:
Form1 frm1 = new Form1();
string Company = frm1.txtCompany.Text.ToString();
This compiles without a problem, however a blank string gets passed when form2 loads instead of the string from the textbox.
Can anyone help?
Thanks in advance,
Smitty