Did you edit the SQL Select code directly in the code or in the recordset window?
it looks like you did the edit directly in the code.
if you look at the code for the SQL it is spread over 4 lines, the SQL code should all be on the same line, having the SQL on multiple lines is causing the issue.
when you change the SQL code, make sure to do it in the recordset dialog box instead of changing it directly in the code.