myConnection.Open()
rtb_Address.Clear()
txt_Name.Clear()
Dim str As String
str = \"SELECT * FROM table1 WHERE (cus_ID = \'\" & txt_ID.Text & \"\
I would recommend the following:
Using cmd As New OleDbCommand("SELECT * FROM table1 WHERE cus_ID = @ID", con)
cmd.Parameters.AddWithValue("@ID", txt_ID.Text)
dr = cmd.ExecuteReader()
While dr.Read()
rtb_Address.Text = dr("cus_Addr").ToString
txt_Name.Text = dr("cus_Name").ToString
End While
End Using