Hi,
I'm getting trouble to work with two forms. Let's say I have form1 and form2. In form1 I have dgv and in form2 I have a button. I woud like fill dgv on from1 when I click on button on form2. I tried this code:
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As System.EventArg s) Handles Button1.Click
Dim form1 As New Form1
form1.EventTabl eAdapter.Fill(f orm1.myDataSet. _Event)
Me.Close()
End Sub
does not work but when I repopulate form1, it works. But woud like to do it without repopulating the form1.
Thanks for help.
I'm getting trouble to work with two forms. Let's say I have form1 and form2. In form1 I have dgv and in form2 I have a button. I woud like fill dgv on from1 when I click on button on form2. I tried this code:
Private Sub Button1_Click(B yVal sender As System.Object, ByVal e As System.EventArg s) Handles Button1.Click
Dim form1 As New Form1
form1.EventTabl eAdapter.Fill(f orm1.myDataSet. _Event)
Me.Close()
End Sub
does not work but when I repopulate form1, it works. But woud like to do it without repopulating the form1.
Thanks for help.