Makes sense. Now to make it a little more challenging! I have a district where I am trying to get the count for each office. So I've created qry1 with distinct employees in the district. It shows 72 records. qry2 is count(*) from qry1. It returns one value, 72. Perfect. Now for the count of each office.
qry1:
Code:
SELECT DISTINCT tblOffices.District, tblOffices.OfficeNO, tblOffices.OfficeName, tblIndividualLearning.CatelogID, tblEmployee.Active, tblIndividualLearning.EmpID
FROM tblOffices INNER JOIN (tblEmployee INNER JOIN tblIndividualLearning ON (tblEmployee.EmpID = tblIndividualLearning.EmpID) AND (tblEmployee.EmpID = tblIndividualLearning.EmpID)) ON tblOffices.ID = tblEmployee.Office
GROUP BY tblOffices.District, tblOffices.OfficeNO, tblOffices.OfficeName, tblIndividualLearning.CatelogID, tblEmployee.Active, tblIndividualLearning.EmpID
HAVING (((tblOffices.District)=54) AND ((tblIndividualLearning.CatelogID)=15) AND ((tblEmployee.Active)=True));
qry2:
Code:
SELECT Count(*) AS TotalNO
FROM qry1;