In an Access97 database, I want to track respondents to direct mail campaigns. I track the name & address of those who respond to the campaigns, and code their name entry with a unique campaign code (MediaCode field) Each "line item" of name, address, mediacode is entered into my Contacts table. I then have a field where I "group" or tag those of matching address together --I'm "householding" them with a unique assigned number(the DupeGroup field). This DupeGroup number is also on the same line-item line as each entry. What I am trying to do is write an SQL statement that says "find the line-item records in table:Contacts that have the same DupeGroup number ("see" my households). Within each of those matching same DupeGroup line-items, show me only the records from those qualifying DupeGroups that have an entry in a MediaCode field of X and and entry in another line-item within that same DupeGroup number of a MediaCode of Y. In business terms, I want to identify which of the households that have responded to two different mailing campaigns and list the names of those people / DupeGroup numbers<br>
<br>
This is as far as I've gone, but it doesn't work:<br>
<br>
SELECT Contacts.GroupDupe, Contacts.FirstName, Contacts.LastName, Contacts.Address, Contacts.MediaCode<br>
FROM Contacts<br>
WHERE (((Contacts.GroupDupe)=[GroupDupe]) AND ((Contacts.MediaCode)="AJ1299" And (Contacts.MediaCode)="GD0100");<br>
<br>
I hope my explanation makes sense - thanks
<br>
This is as far as I've gone, but it doesn't work:<br>
<br>
SELECT Contacts.GroupDupe, Contacts.FirstName, Contacts.LastName, Contacts.Address, Contacts.MediaCode<br>
FROM Contacts<br>
WHERE (((Contacts.GroupDupe)=[GroupDupe]) AND ((Contacts.MediaCode)="AJ1299" And (Contacts.MediaCode)="GD0100");<br>
<br>
I hope my explanation makes sense - thanks