Kamis, 21 Juni 2018

[MS_AccessPros] Query issue

 

Good Evening!


I have a database with the following elements:

Table tblMembers with information concerning members of the group

Table tblEvent with descriptions and dates of each event

Table tblEventAttendance to join Members.ID and Event.ID elements to indicate members in attendance at an event.


I use a form to select the event, with initiates a second form to select members to attend the event.


In the second form, I have a ListBox containing to members who attended the selected event. The following SQL statement works to populate the box:


SELECT [tblMembers].[Last] & ", " & [tblMembers].[First] AS Expr1
FROM tblMembers INNER JOIN tblEventAttendance ON tblMembers.ID = tblEventAttendance.MemberID
WHERE (((tblMembers.ID)=[tblEventAttendance].[MemberID]) AND ((tblEventAttendance.EventID)=[Forms]![frmSelectAttendees].[curEvent]))
ORDER BY [tblMembers].[Last] & ", " & [tblMembers].[First];


I have a second ListBox, which I would like to contain all in the tblMembers table who are NOT in attendance at the event, but I have been unable to manage a query to return them. Essentially, I want to return all the members from the tblMembers table who do NOT have an entry matching the Event.ID entry in the tblEventAttendance table. Does someone have an idea for the query?


I do appreciate it.


Thanks!

Sean



__._,_.___

Posted by: swdetmers@yahoo.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (11)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar