I have a table of medical complaints. I am trying to give the user the chance to see if a similar term has been added prior to them adding a new complaint. Ex: The term "seizure" exists and the user wishes to add "seizures". I have taken the term the user has entered and trimed a few letters off it, and placed it in the variable strTerm1.
I have tried to create a sql statment as follows:
strSQL = "SELECT [tblChiefCompl_fe].[ChiefCompl_Description]" & _
" FROM [tblChiefCompl_fe]" & _
" WHERE ((([tblChiefCompl_fe].[ChiefCompl_Description])" & _
" LIKE """ & strTerm1 & "*""" & "))"
And process it using:
DoCmd.RunSQL (strSQL)
Access 2000 responds with error 2342. RunSQL requires an arguement consisting of a sql statement.
Can anyone see what is probably an obvious error on my part?
Thanks
I have tried to create a sql statment as follows:
strSQL = "SELECT [tblChiefCompl_fe].[ChiefCompl_Description]" & _
" FROM [tblChiefCompl_fe]" & _
" WHERE ((([tblChiefCompl_fe].[ChiefCompl_Description])" & _
" LIKE """ & strTerm1 & "*""" & "))"
And process it using:
DoCmd.RunSQL (strSQL)
Access 2000 responds with error 2342. RunSQL requires an arguement consisting of a sql statement.
Can anyone see what is probably an obvious error on my part?
Thanks