'in your form1 instantiate the form2
dim d as new form2
'in the datagrid click events
d.TextBox1.Text = DataGrid1.Item(DataGrid1.CurrentCell.RowNumber, DataGrid1.CurrentCell.ColumnNumber)
declare application wide variables as Friend, not Public public shares yer variable system wide (can be accessed by completely seperate programs) whereas Friend keeps it to your app onlyrhinton said:add a module to your project and declare public variables in it. Those variable will be accessible throughout the project.
public shared username as string
user = txtUser.Text
Try
Dim currentform = New frmAccess
currentform.Show()
Catch ex As Exception
MessageBox.Show(ex.Message())
End Try
lblUser.Text = ("User: " & frmLogin.user)