levyuk
Well-known member
Hi
I have 2 forms, 'NewEmployer' and 'Placement'.
'NewEmployer' has a textbox called 'TextBoxCompanyName'. It also has a button called 'Add Placement'. When the button is clicked it opens up the 'Placement' form using this code
[/size]
The 'Placement' form also has a textbox called 'TextBoxCompanyName'. What I need to do is pass the text from the 'NewEmployer' form to the 'Placement' form.
I am trying this code but it wont work
[/color][/color][/size]
Anyone know how I can do it
I have 2 forms, 'NewEmployer' and 'Placement'.
'NewEmployer' has a textbox called 'TextBoxCompanyName'. It also has a button called 'Add Placement'. When the button is clicked it opens up the 'Placement' form using this code
VB.NET:
[size=2][color=#0000ff]Dim[/color][/size][size=2] placement [/size][size=2][color=#0000ff]As[/color][/size][size=2] [/size][size=2][color=#0000ff]New[/color][/size][size=2] Placement[/size]
[size=2]placement.ShowDialog()[/size]
[size=2]
The 'Placement' form also has a textbox called 'TextBoxCompanyName'. What I need to do is pass the text from the 'NewEmployer' form to the 'Placement' form.
I am trying this code but it wont work
VB.NET:
[/size]
[size=2][size=2][color=#0000ff]Dim[/color][/size][size=2] NewEmployer [/size][size=2][color=#0000ff]As[/color][/size][size=2] [/size][size=2][color=#0000ff]New[/color][/size][size=2] NewEmployer2[/size][/size]
[size=2][size=2][color=#0000ff]Private[/color][/size][size=2] [/size][size=2][color=#0000ff]Sub[/color][/size][size=2] Placement_Load([/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] sender [/size][size=2][color=#0000ff]As[/color][/size][size=2] [/size][size=2][color=#0000ff]Object[/color][/size][size=2], [/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] e [/size][size=2][color=#0000ff]As[/color][/size][size=2] System.EventArgs) [/size][size=2][color=#0000ff]Handles[/color][/size][size=2] [/size][size=2][color=#0000ff]MyBase[/color][/size][size=2].Load[/size][/size]
[size=2][size=2][color=#0000ff]Me[/color][/size][size=2].TextBoxCompanyName.Text = NewEmployer.TextBoxCompanyName.Text[/size][/size]
[size=2][size=2][color=#0000ff]End[/color][/size][size=2] [/size][size=2][color=#0000ff]Sub[/color][/size][/size]
[size=2][size=2][color=#0000ff][color=black]
Anyone know how I can do it