Trouble with select query

sly like Coyote

Registered User.
Local time
Today, 11:05
Joined
Apr 14, 2010
Messages
82
I'm trying to write a select query and I'm having some trouble. I have one table, tbl_Households, that holds information about a family and another, tbl_Individuals, that holds information about the actual people in that family (name, age, etc) along with a foreign key identifying which household they're part of.

What I want to do is have two queries, one which returns all the individuals that are associated with households that contain no children, and one which returns all individuals that are in households that contain both children and adults.


I had (foolishly) thought that I could just use the access query tool and make it work by including more than one instance of the field I needed to test, but after thinking about it that obviously won't work. Can anyone lead me in the right direction here?
 
After thinking a out this so e more, I think it will just take getting a better understanding of subqueries. I'll look into that and post more if I manage to figure it out.
 
You can find the households that contain children in a simple query and then use that result in an unmatched query against the household table to find those without children.

Brian
 
It's probably not quit that simple, because it is possible t have a household of only children. I can do the adults only and child only queries that way, though, and then compare to those two - it it's not in the adults only or children only results, it would be both adults and children.

That will probably be easier, thanks for the tip.
 

Users who are viewing this thread

Back
Top Bottom