Report Group Count?


Code Agent

I have a report that is grouped by field: "Last Name" and then grouped by
field: "Service Type". Their are 4 service types. How do I get the total
number of different last names and the total number of each of the 4 Service
types in the the report footer? Thanks in advance for any help.


Create a query like this

SELECT Count(TableName.ServiceType) AS CountOfServiceType,
TableName.ServiceType, TableName.Surname
FROM TableName
GROUP BY TableName.ServiceType, TableName.Surname;

Al Campagna

Code Agent,
I think a simple example of your data and what your trying to do
would be helpful.
Something's what I have now... and here's what I'd like to

But, there's one problem that should be addressed. Grouping by LastName
is not good design. If you had Bob Smith, and Jane Smith, their data would
combine to yield incorrect numbers... such as your requested Count.
LastName is not unique enough to prevent that...
You should be grouping on a unique key value assigned to each person,
like an
EmployeeID, or CustID, etc...
Al Campagna
Microsoft Access MVP

"Find a job that you love... and you'll never work a day in your life."

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question