I'm trying to do a tally of election types using count, but am getting the wrong answer.
In the database, LocalGovernments have Wards and Ward have Elections. An election can be one of two ElectionTypes ('In Person' or 'Postal'). Every Ward in a LocalGovernment has the same ElectionType.
I want a count of the number of LocalGovernments having each type of election.
I can do a query showing the ElectionType for each LocalGovernment, which correctly only outputs one row per LocalGovernment, but when I add totals to this query in the designer to get the count and then run it, it counts all the elections in all the _Wards_. Trying unique records | unique rows in the query properties doesn't change the result.
I can do a second query on the working query to get my answer, but I'm sure it can be done using only one query, and I'd prefer it that way.
Many thanks for any pointers.
mcalex
In the database, LocalGovernments have Wards and Ward have Elections. An election can be one of two ElectionTypes ('In Person' or 'Postal'). Every Ward in a LocalGovernment has the same ElectionType.
I want a count of the number of LocalGovernments having each type of election.
I can do a query showing the ElectionType for each LocalGovernment, which correctly only outputs one row per LocalGovernment, but when I add totals to this query in the designer to get the count and then run it, it counts all the elections in all the _Wards_. Trying unique records | unique rows in the query properties doesn't change the result.
I can do a second query on the working query to get my answer, but I'm sure it can be done using only one query, and I'd prefer it that way.
Many thanks for any pointers.
mcalex