A
Andy79
Dear All,
Here is my simple database:
Table 1 contains "Rooms"
Table 2 contains "Tasks"
Table 1 is linked to table 2 by a 1-to-many link. So that every Room
has many tasks.
I want a query to return the Rooms where ALL the tasks are the same as
the criteria I define.
This is as far as I got, but this query below, returns all the rooms
that have the criteria at least once - not the room that have ONLY
that criteria..
SELECT DISTINCT Room.Room_name, [Tasks].[task_name]
FROM Room INNER JOIN [Tasks] ON Room.Room_ID = [Tasks].Room_ID
WHERE ((([Tasks].[Task_name])="Example1"));
Help please!!!
Many Thanks
Andy
Here is my simple database:
Table 1 contains "Rooms"
Table 2 contains "Tasks"
Table 1 is linked to table 2 by a 1-to-many link. So that every Room
has many tasks.
I want a query to return the Rooms where ALL the tasks are the same as
the criteria I define.
This is as far as I got, but this query below, returns all the rooms
that have the criteria at least once - not the room that have ONLY
that criteria..
SELECT DISTINCT Room.Room_name, [Tasks].[task_name]
FROM Room INNER JOIN [Tasks] ON Room.Room_ID = [Tasks].Room_ID
WHERE ((([Tasks].[Task_name])="Example1"));
Help please!!!
Many Thanks
Andy