F
Frustrated with VBA
I have a table (Events) which holds the following:
EventName, EventType, EventState, and some other fields
I have another table (Attendance) which holds:
EventDate, EventName, Attendee
I have created some queries based on this table. One is to determine which
events any particular attendee still needs to complete. In its simpliest
form, this is the code for that (I stripped some of the fields that aren't
relevant to this):
SELECT EventName, EventType, EventState
FROM Events
WHERE (((EventName) Not In (select EventName from
Attendance where Attendee =[Attendee?]));
What I desire to do is create a similar query that will return all the
events that two (three or four) attendees need, but excluding those that not
all need.
Joe has attended event1, event2, event3
Mary has attended event2, event4, event5, event6
The query should return event7, event8, event9 only since both need them.
It's as though I need to run the query for a single attendee twice and then
compare them to return only those events which appear in both lists. I
imagine to do this for three or four attendees is even more involved. Any
help constructing this would be appreciated.
EventName, EventType, EventState, and some other fields
I have another table (Attendance) which holds:
EventDate, EventName, Attendee
I have created some queries based on this table. One is to determine which
events any particular attendee still needs to complete. In its simpliest
form, this is the code for that (I stripped some of the fields that aren't
relevant to this):
SELECT EventName, EventType, EventState
FROM Events
WHERE (((EventName) Not In (select EventName from
Attendance where Attendee =[Attendee?]));
What I desire to do is create a similar query that will return all the
events that two (three or four) attendees need, but excluding those that not
all need.
Joe has attended event1, event2, event3
Mary has attended event2, event4, event5, event6
The query should return event7, event8, event9 only since both need them.
It's as though I need to run the query for a single attendee twice and then
compare them to return only those events which appear in both lists. I
imagine to do this for three or four attendees is even more involved. Any
help constructing this would be appreciated.