Assuming that the following returns all students that DID attend during
2009 then you can use this query as a sub-query in the FROM clause
SELECT Register.SS
FROM Register
WHERE Loc_Code Like "WPB*09"
So that gives you a query like the following.
SELECT [LNAME] & " " & [FNAME] AS Expr1, STUDENT.COMPANY,
STUDENT.ADDRESS, STUDENT.CITY, STUDENT.STATE, STUDENT.ZIP,
STUDENT.PHONE, REGISTER.LOC_CODE, REGISTER.[FIELD DATE]
FROM (STUDENT INNER JOIN REGISTER ON STUDENT.SS=REGISTER.SS)
LEFT JOIN
(SELECT Register.SS
FROM Register
WHERE Loc_Code Like "WPB*09") as Attend09
ON STUDENT.SS = Attend09.SS
WHERE (((REGISTER.LOC_CODE) Like "WPB*08"))
AND Attend09.SS is NULL
'====================================================
John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
Hi Jerry, Thanks...this is where we get the entire 08 attendees (at this
particular class) to show up...
SELECT [LNAME] & " " & [FNAME] AS Expr1, STUDENT.COMPANY,
STUDENT.ADDRESS, STUDENT.CITY, STUDENT.STATE, STUDENT.ZIP,
STUDENT.PHONE, REGISTER.LOC_CODE, REGISTER.[FIELD DATE]
FROM STUDENT INNER JOIN REGISTER ON STUDENT.SS=REGISTER.SS
WHERE (((REGISTER.LOC_CODE) Like "WPB*08"));
Jerry Whittle said:
Show us the SQL for a query that is somewhat close to working. Open the
query in design view. Next go to View, SQL View and copy and past it here.
--
Jerry Whittle, Microsoft Access MVP
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.
:
we have a school...we are trying to make a list of people that attended
either semester in 2008, but did NOT attend the spring semester 2009; we can
get the 2008 to add up, but then cannot get the "NOT" 2009...HELP!