D
DaveG
Hi
Using VB.net 2003
I know how to access controls on a 2nd form after declaring the form in
the first.
But how do I access the controls on the original form from the 2nd form.
(in frmMain)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim form2 As New Form2
form2.TextBox1.Text = TextBox1.Text
form2.Show()
End Sub
(in Form2)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim form1 As New Form1
form1.TextBox1.Text = TextBox1.Text
form1.Update()
Me.Close()
End Sub
Form2 textbox updates ok
The textbox in form1 does not update and still holds the original text
before opening Form2
This is just a simple example I cannot get working, once I can get this
working the I should not have problems with the actual code I need to use.
There must be a simple answer to this....???
Thanks in advance for any help given
DaveG
Using VB.net 2003
I know how to access controls on a 2nd form after declaring the form in
the first.
But how do I access the controls on the original form from the 2nd form.
(in frmMain)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim form2 As New Form2
form2.TextBox1.Text = TextBox1.Text
form2.Show()
End Sub
(in Form2)
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim form1 As New Form1
form1.TextBox1.Text = TextBox1.Text
form1.Update()
Me.Close()
End Sub
Form2 textbox updates ok
The textbox in form1 does not update and still holds the original text
before opening Form2
This is just a simple example I cannot get working, once I can get this
working the I should not have problems with the actual code I need to use.
There must be a simple answer to this....???
Thanks in advance for any help given
DaveG