troubleshooting Question

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

Avatar of Jeremy Hayden
Jeremy Hayden asked on
Microsoft AccessVBASQL
2 Comments1 Solution59 ViewsLast Modified:
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
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros