We help IT Professionals succeed at work.

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

Jeremy Hayden
on
53 Views
Last Modified: 2017-04-05
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

Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2016
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
CERTIFIED EXPERT
Top Expert 2016

Commented:
a solution was provided

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions