I'm getting the error message "Data type mismatch in criteria expression" with the following UPDATE statement executing in MS Access 2013.
UPDATE tblTasks
SET tblTasks.IconFilePath = "C:\Images\john.smith.jpg"
WHERE (((Replace([PersonResponsible]," ",""))="Smith,John")
AND ((Len([PersonResponsible]))>0));
When I remove the Replace function call from the WHERE clause the statement executes without error.
The Data Type of the PersonResponsible field is Short Text(255). I have tried wrapping the the Replace call in CStr and also NZ but still got the data type mismatch error.
Any thoughts are appreciated.
Thank you