General discussion

Locked

Access 97 Query Problem

By MRA2 ·
Parent Table has Names $ Social Security Numbers.
Child Table has Social Security Numbers (Link) and a record for each year that person participated (2002 - 2001 - 2000)

I want to find those people who participated in 2002 ONLY (They have no 2001 Child record and no 2000 child record)

Can you help???

Thanks,
A2

This conversation is currently closed to new comments.

6 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Access 97 Query Problem

by jboardman In reply to Access 97 Query Problem

Create a query with both tables linked by the SSN. Configure the link so that ALL the Parent table records and ONLY the matching Child table records will show up. Put in whatever fields you want, but make sure you have added the 2001 and 2000 fieldswith criteria of Is Null or ="" for both fields. Add the 2002 field with criteria of Is Not Null or <>"" This should give you everyone who participated in 2002 & not in 2000 or 2001. If you need more details, you can contact me directly at jwboardman@celanese.com

Collapse -

Access 97 Query Problem

by MRA2 In reply to Access 97 Query Problem

The Example.mdb that you Emailed me was FANTASTIC!!!! Thanks for all of your help!!!! MRA2@mindspring.com

Collapse -

Access 97 Query Problem

by Bob Sellman In reply to Access 97 Query Problem

First, create a grouping query on Child that groups by SSN with a count of the number of records (count of year). I'll call that query qgrpYearsParticipated.

Create a second query where the Parent and Child tables are linked by the SSN and theremust be a match in both tables and the year column in Child must equal 2002, and also include the qgrpYearsParticipated linked (only records that are in both the Child table and the query) by SSN with the criteria of Count = 1.

The result will bethat the first part of the second query only lists matching records where the people participated in 2002. The second part only selects people who participated for one year, so since we're only displaying people who participated in 2002, if they only participated in one year then they are the ones who meet your criteria.

Collapse -

Access 97 Query Problem

by MRA2 In reply to Access 97 Query Problem
Collapse -

Access 97 Query Problem

by MRA2 In reply to Access 97 Query Problem

Point value changed by question poster.

Collapse -

Access 97 Query Problem

by MRA2 In reply to Access 97 Query Problem

This question was closed by the author

Back to Web Development Forum
6 total posts (Page 1 of 1)  

Related Discussions

Related Forums