I have a table of people who have fundraised in the past. This is linked to a table of fundraised amounts and dates. Some people will only have fundraised once, others several times. What I am trying to do is write a query that picks out the people that have not fundraised since 2001. I thought the way to do this would be to select last in the group totals and the query I have tried is:
SELECT Maintable.ID_No, Maintable.Lastname, Maintable.Firstname, Last(T_funds.Funds_received) AS LastOfFunds_received
FROM T_funds RIGHT JOIN Maintable ON T_funds.ID_No = Maintable.ID_No
WHERE (((Maintable.JoinDate)<#1/1/2001#) AND ((Maintable.Membership_Type)="donor"))
GROUP BY Maintable.ID_No, Maintable.Lastname, Maintable.Firstname
HAVING (((Last(T_funds.Funds_received))<#1/1/2001#));
However, I still get people who fundraised since 2001. Is there any way of writing this query and making it work?
Thank you.
SELECT Maintable.ID_No, Maintable.Lastname, Maintable.Firstname, Last(T_funds.Funds_received) AS LastOfFunds_received
FROM T_funds RIGHT JOIN Maintable ON T_funds.ID_No = Maintable.ID_No
WHERE (((Maintable.JoinDate)<#1/1/2001#) AND ((Maintable.Membership_Type)="donor"))
GROUP BY Maintable.ID_No, Maintable.Lastname, Maintable.Firstname
HAVING (((Last(T_funds.Funds_received))<#1/1/2001#));
However, I still get people who fundraised since 2001. Is there any way of writing this query and making it work?
Thank you.