myConnection.Open() rtb_Address.Clear() txt_Name.Clear() Dim str As String str = \"SELECT * FROM table1 WHERE (cus_ID = \'\" & txt_ID.Text & \"\
cus_ID is probaly a numeric data type, but you try to query it with a string: (cus_ID = 'thevalue').
cus_ID
(cus_ID = 'thevalue')
Just remove the enclosing ': (cus_ID = thevalue)
'
(cus_ID = thevalue)
or better, use a parameterized query to prevent sql-injection.