when i run my code...this error come out
"data type mismatch in criteria expression"
here my code:
Private Sub Text2_Change()
TXT1 = ""
TXT1 = "SELECT * FROM Profile WHERE sID =' " & Text2 & "'"
If RS.State = 1 Then
RS.Close
End If
RS.Open TXT1, Conn, adOpenKeyset, adLockOptimistic
If RS.RecordCount > 0 Then
txtText2 = RS.Fields(1)
txtName = RS.Fields(2)
txtDateOfBirth = RS.Fields(3)
txtAddress = RS.Fields(4)
txtIC = RS.Fields(6)
txtContact = RS.Fields(5)
cboStatus = RS.Fields(9)
txtAge = RS.Fields(8)
txtCourse = RS.Fields(11)
cboFaculty = RS.Fields(10)
txtMatric = RS.Fields(7)
txtLicense = RS.Fields(12)
txtEngine = RS.Fields(13)
txtNoPlat = RS.Fields(15)
txtModel = RS.Fields(16)
cboType = RS.Fields(14)
cboColour = RS.Fields(17)
End If
RS.Close
End Sub
my system suppose save the database on access
really need the answer ASAP...thank a lot