5 pts.
 Can an Access 2003 query exclude the results from a previous query?
I have a database with 2 tables: one with name/address info, and another with info on yearly donations to our organization. The 2 tables are linked through an ID number. I have set up a query that will give me name/address info for those who donated in 2010 (where the year field is 2010 and the contribution fields are >0) that will be used in a report that makes mailing labels. I want separate mailing labels for everyone else. Is there a way to set up a query that excludes the results of a previous query? There are too many variables to have a simple query that is the opposite of the first one (2010 = 0, for instance) because if someone didn’t donate in 2010, 2010 doesn’t appear in their record. Also, many people who donated in 2010 also donated in previous years, and I don’t want their names repeated. I’ve tried as many things as I can think of, to no avail! Any help would be greatly appreciated.

Software/Hardware used:
Access 2003
ASKED: November 17, 2010  7:37 PM
UPDATED: November 17, 2010  8:36 PM

Answer Wiki:
I'm not familiar with the Access' query design view or the query wizards, but you could create a query in SQL view with a code similar to this: <pre>SELECT * FROM donor d WHERE NOT EXISTS ( SELECT 1 FROM donations WHERE id = d.id AND year = 2010 AND amount > 0)</pre> Let us know if this is what you meant.
Last Wiki Answer Submitted:  November 17, 2010  8:36 pm  by  carlosdl   63,535 pts.
All Answer Wiki Contributors:  carlosdl   63,535 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _