What SQL statement can help me with this program to search for a name I type in a text (txtPatNm) and put a check mark in the appropriate box either patient found or not found. My program below is not working? Why? My database table is called DoctorPatInformation and the field with the patient Name is called PatName. I linked the database with the form by using the data button and also the text with the PatName field.
MyString = txtPatNm.Text
strSQL = "SELECT PatName, FROM DoctorPatInformation WHERE PatName = MySring"
Data1.RecordSource = strSQL
If strSQL = MyString Then
chkPatFound.Value = 1
chkPatNotFound.Value = 1
'Data1.RecordSource = "SELECT * FROM DoctorPatInformation "