I am getting "Run-time error '3075' when running the following code. Please help.

I am getting the error on the WHERE clause on line 12

Sub LEASEEXECUTIONFINALFILTERED()
DoCmd.RunSQL "SELECT LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.[LEASEEXECUTIONEXTRACT_Key ID], LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.[Store Name], LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.[Center Name], " & _
"LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.LEASEEXECUTIONEXTRACT_Brand, LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.[LEASEEXECUTIONEXTRACT_Store Type], LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.Document, " & _
"LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.[LL / Developer], LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.[LEASEEXECUTIONEXTRACT_Deal Maker], LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.[Business/ Approval Date], " & _
"LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.[Legal Package Submission Date], LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.[RE Targeted Full Execution Date], LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.[Date of Possession], " & _
"LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.[Construction Start Date], LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.[Open Date / Effective Date (Extensions)], LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.[Lease Fully Executed Date], " & _
"LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.[Approved?], LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.LeaseAdminTrackerMergeTable_COMMENTS, LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.LEASEEXECUTIONEXTRACT_Status, " & _
"LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.[LEASEEXECUTIONEXTRACT_Target Approval Month], LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.[LeaseAdminTrackerMergerandGRELRENATable_Key ID], " & _
"LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.[LeaseAdminTrackerMergerandGRELRENATable_LEGAL LEAD], LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.[GREL RE NA Extract_COMMENTS], " & _
"LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.[LeaseAdminTrackerMergerandGRELRENATable_FULLY EXECUTED], LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.[LeaseAdminTrackerMergerandGRELRENATable_DOCUMENTS DISTRIBUTED] INTO [LeaseExecutionFinal-Filtered] " & _
"FROM LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable " & _
"WHERE (((LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.LEASEEXECUTIONEXTRACT_Status) = ('In Legal','Pre-Approval','Preparing for Legal')) AND ((([LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable].[Document])=[Document]) Is Not Null And (([LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable].[Document])=[Document]) Is Not Null)) " & _
"ORDER BY LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.[Store Name];"
End Sub

Open in new window

Jeremy HaydenAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rey Obrero (Capricorn1)Commented:
change the equal "=" sign with IN

"WHERE (((LeaseAdminTrackerMergerandGRELRENAandGRELOPTIONSTable.LEASEEXECUTIONEXTRACT_Status) IN ('In Legal','Pre-Approval','Preparing for Legal')) AND
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Rey Obrero (Capricorn1)Commented:
a solution was provided
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.