Reputation: 151
I've got a sql command in vba (access 2007) that's giving me errors, and I don't know why. Specifically, it says that there's a missing operator in the WHERE clause. I can't figure out what is missing. It's not the UDF ReplaceNotAN, which replaces the specific non-alphanumeric characters.
Any ideas for what's going on, and how to fix it? Everything I could find for similar error on the intertubez is irrelevant (mostly about the single vs double quotes issue - but clearly that doesn't apply here).
dcSql = "UPDATE table SET table.Customer=ReplaceNotAN(Customer)" & _
" WHERE table.Customer Like '*[-,.;:_'&=\/#]*';"
DoCmd.RunSQL dcSql
Upvotes: 0
Views: 609
Reputation: 16677
you have an additional single quote in the like phrase...
try it by doubling that one i think...
Like '*[-,.;:_''&=\/#]*';"
Upvotes: 2