I am relatively new to VB.Net and to be honest modern programming in general (long gone are the days of Turbo Pascal) and I need some help with classes.
I want to pass a variable from one form, so that it can be used as part of connection string in a new form.
I have a button that I wish to launch a new form. I already know the field I want to pass, and have been trying :-
Private Sub btndetail_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btndetail.Click
details(txtcustname.Text)
End Sub 'from the main form
And a new form:-
Private Sub Detail_Load(ByVal customer As String) Handles MyBase.Load
txtcustname.Text = customer
End Sub 'new form called details
Firstly, it does like 'details' and main form, nor does it like the 'Mybase.load'.
Any help?
I want to pass a variable from one form, so that it can be used as part of connection string in a new form.
I have a button that I wish to launch a new form. I already know the field I want to pass, and have been trying :-
Private Sub btndetail_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btndetail.Click
details(txtcustname.Text)
End Sub 'from the main form
And a new form:-
Private Sub Detail_Load(ByVal customer As String) Handles MyBase.Load
txtcustname.Text = customer
End Sub 'new form called details
Firstly, it does like 'details' and main form, nor does it like the 'Mybase.load'.
Any help?