[ad_1]
I want to show the name of the user when he/she types his/her LRN in the textbox(Form 3). The name must be shown on another form (Form 15) when the LRN is recognized from ms access.
Public Class Form15
Private Sub Form15_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim connection As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Database4.mdb")
connection.Open()
Dim cmd As OleDbCommand = New OleDbCommand("select LName from Table1 where [LRN]='" & Form3.GunaTextBox1.Text & "'", connection)
Dim reader As OleDbDataReader = cmd.ExecuteReader
While reader.Read
GunaLabel1.Text = reader.ToString
End While
End Sub
End Class
[ad_2]