Code:Private Sub btnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSearch.Click Dim cmd As New OleDbCommand("SELECT * FROM tblContacts where Surname " & txtSurname.Text & "", con) dr = cmd.ExecuteReader If dr.HasRows Then dr.Read() txtfirstName.Text = dr("Surname") End If End Sub


Reply With Quote



