You cannot count the records and return all the details in the same query.
This will count all the records.
SELECT Count(*) AS CountRecords
FROM Attendees INNER JOIN
(Events INNER JOIN Registration
ON Events.EventID = Registration.EventID)
ON Attendees.AttendeeID = Registration.AttendeeID
This will return all the records
SELECT Attendees.AttendeeFirstName, Attendees.AttendeeLastName,
Registration.EventID, Events.StartDate, Events.Location,
Count(Attendees.AttendeeFirstName) AS CountOfAttendeeFirstName
FROM Attendees INNER JOIN (Events INNER JOIN Registration ON Events.EventID
= Registration.EventID) ON Attendees.AttendeeID = Registration.AttendeeID
GROUP BY Attendees.AttendeeFirstName, Attendees.AttendeeLastName,
Registration.EventID, Events.StartDate, Events.Location
ORDER BY Attendees.AttendeeLastName;
If you want a count of attendees by Event then
SELECT Registration.EventID, Count(*) AS CountOfAttendeeFirstName
FROM Attendees INNER JOIN
(Events INNER JOIN Registration
ON Events.EventID = Registration.EventID)
ON Attendees.AttendeeID = Registration.AttendeeID
GROUP BY Registration.EventID
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County