Have an SQL statement that is erroring:
SELECT MemberAssignments.StartDate, MemberAssignments.EndDate, MemberAssignments.AssignmentName FROM MemberAssignments INNER JOIN AssignmentTypeDefinitions ON (MemberAssignments.AssignmentType = AssignmentTypeDefinitions.TADLeaveTypeID) WHERE (((MemberAssignments.MemberID) = 276) AND ((MemberAssignments.StartDate) <= #11/30/2011#) AND ((MemberAssignments.EndDate) >= #11/1/2011#) AND (((AssignmentTypeDefinitions.FullType) = 'TAD INTERNAL') OR ((AssignmentTypeDefinitions.FullType) = 'TAD DISTANT') OR ((AssignmentTypeDefinitions.FullType) = 'TAD NEAR')))
I've tried it with and without parenthesis (excepting the OR section which needs it I think.
It's the OR ('TAD INTERNAL' OR 'TAD NEAR' OR 'TAD DISTANT') section that is causing the error, as the statement will run without it. Unfortunately, I need it :P
Working in an excel 2003 VBa envirnment, referencing a .mdb database using DAO.