Here's a similar situation:
Filter criteria that work in a query will need to be modified to include delimiters where a SQL statement is used instead. Other changes may be needed e.g. if dates are being filtered, the SQL statement needs to use mm/dd/yyyy format even though that isn't necessary in a query
So if I post a question stating that I have a query that works but when converted to SQL it doesn't, it would be perfectly reasonable to expect forum members to ask me to post the SQL.
Anyway I'll leave you to it... Good luck