take entries of a table as criteria for a query

  • Thread starter Thread starter Claus Haslauer
  • Start date Start date
C

Claus Haslauer

Hi,
I'm googleing and reading all morning about this, so I might be
frustrated or I don't see the the tree in the forest - so please help! :-)

I've got one table (tbl_A), that contains one field with IDs (say of
cakes at the local bakery) [tbl_A]![allCakeID]

I've got a second table (tbl_B) that contains a field with IDs of the
cakes that I hate [tbl_B]![hateID].

How can I make a query that lists the cakes-IDs which I don't hate?

So far I've got:

SELECT [tbl_A].allCakeID
FROM [tbl_A]
WHERE ((([tbl_A].allCakeID)<>[tbl_B]![hateID]));

Then the parameter-entry windows pops up.
I guess the problem is, that in the criteria of the query access cant
find the single entries..

Thanks for any help,
Claus
 
Ok, found sollution (finally)

SELECT [tbl_A].*
FROM [tbl_A] LEFT JOIN [tbl_B] ON [tbl_A].allCakeID = [tbl_B].[hateID]
WHERE ((([tbl_B].ID) Is Null));


Claus Haslauer wrote:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top