Query IF NOT FOUND

fernin8r

Registered User.
Local time
Today, 15:30
Joined
May 28, 2002
Messages
142
I'm trying to set a List Box up to display all records from one table that are not found in another table. For Example.

tbl1:

ID | Service
1 | Srv1
2 | Srv2
3 | Srv3


tbl2:

ServiceID
1


I want the display to be

Srv2
Srv3

Because the ID Column for Srv1 is found in tbl2.

Is this possible?

Let me know if I need more explanation
 
The Unmatched Query wizard should be able to create this for you.
 
Thanks, I forgot about Left Join Statements
 
Left Join with a Sub Query

Is there a way to Right Join with a Sub query. Right now I have to have to save a separate query "Query1" and use that in my Right Join Statement.

ex.

SELECT DISTINCTROW Equipment.ID, Equipment.Name
FROM Query1 RIGHT JOIN Equipment ON Query1.e_ID = Equipment.ID
WHERE (((Query1.e_ID) Is Null) AND ((Equipment.p_ID)=[Forms]![Summary]![ID]) AND ((Equipment.Division)=[Forms]![Summary]![Frame8]));
 

Users who are viewing this thread

Back
Top Bottom