The thing you have to remember about the Total row is that you have to have
something in there for each column. Suppose, for example, you create a
Totals query based on the Orders table from the Northwind sample database.
If you Group By OrderID and Count CustomerID, you'll get one row for each
order, and the Count column will return 1 for each record. It is returning
the number of customers who places this specific Order, which of course can
only be one.
If you were to remove the OrderID column from the query and replace it with,
say, OrderDate, so that you Group By OrderDate and Count CustomerID, you'll
get one row for each date that orders were taken. The Count column will then
return varying numbers, because it is counting the number of customers who
placed orders on that date.
If you removed the OrderDate column, and replaced it with EmployeeID column,
you'd get one row for each employee, with a count of how many customers have
ever placed an order with that employee.
The key point is that every column you add or take away is likely to change
the result. That is why simply adding a totals row to your existing query is
not the simple solution that it might at first appear to be. If you wanted
to count the number of customers in each city, you could certainly do that,
by adding *only* the city and customer ID fields to the query, grouping on
City and counting customer ID. But as soon as you start adding any
additional columns to that query, you're likely to change the result -
unless only one value can occur in that additional column for each value
that occurs in the city column.
I really think you'll find a report the best solution to your problem - and,
unlike a query, you won't have to re-set the margins every time you want to
print it!
--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com
The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.