Basic query question...I think

bovinda

New member
Local time
Yesterday, 16:44
Joined
Jun 26, 2009
Messages
5
I'm not sure how to do this, and I can't seem to figure it out by reading instructions or the help guides in Access 2007, so any help is GREATLY appreciated. I'm sure it's obvious once you know how to do it.

In one table, I have ID#s (in column 1) that are labeled as Case or Control (in column 2). In a second table, I have orders that are associated with each unique ID from table 1.

What I want to do is make a query that will return all the orders associated with IDs that are cases, or all the orders that are associated with controls.

So, say I have a 142 IDs that are cases, but like 4000 orders that are associated with those IDs. How do I make a query to pull just those order from Table 2 and all their associated columns? :confused: Thank you in advance!
 
Open a new query, and add both tables to the design grid. If a join line doesn't automatically appear between the ID field in each table, click and drag to create one. Add the appropriate fields from the second table, plus the Case/Control field from the first. Put "Case" in the criteria row under that field. Run the query and see what you get.
 
That did it! I'm now up and running, and I can figure out the other queries I need as well now that I know how to do that. Thank you so much! :)
 
No problem, glad it worked for you.
 

Users who are viewing this thread

Back
Top Bottom