Hi All,
I have form 4 & form 5 both having several textboxes.
On form4, all the textbox information inserted should go to the datagridview using the following code;
Private Sub Form4_Load(sender As Object, e As EventArgs) Handles MyBase.Load
table.Columns.Add("Header1", Type.GetType("System.String"))
Then when clicking a button normally on a single form, it would execute the following code which would populated the datagridview1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
table.Rows.Add(TextBox1.Text)
My question is, if instead the button shows form5 and i have textboxes there which need populating to a single datagridview how would i achieve this.
I have tried the following code but no luck:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
table.Rows.Add(Form4.TextBox1.Text)
The idea is that information inserted into textbox1 from form4 and then textbox 1 on form5 all populates to a single datagridview.
What I have tried:
<pre>Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
table.Rows.Add(Form4.TextBox1.Text)