How to get Totals or Sums from a single field in a query?

David Ball

Registered User.
Local time
Today, 17:19
Joined
Aug 9, 2010
Messages
230
Hi,

I am very confused about how to get Totals and Sums out of a query to go into a report. For example if I have one field for Colour and I want to show the total number of Reds and the totals numbers of Blues on a summary report I would make two queries, one for each colour I want, set a Criteria for the colour I want in each query, create another query to bring these two together, and in the report use Totals to get the final figure into the report. If I have a dozen items in a query that I want to appear on the report I will need to create about two dozen queries to get what I need on the report.
I know this is not the way to go but I am completely confused about how to get figures from a field in a query into a Total or Sum on a report.
Is there a way to pull this info from a single field in a query?

Thanks very much

Dave
 
No, you would not make a new query for each color, you would click the Summation Character, or Sigma, on the query design ribbon, and Group By color. Then you can perform aggregate functions on all the other fields in the query, like you can Count() the ID field, or find the Max() date, and so on.
 
Thanks very much, MarkK
 

Users who are viewing this thread

Back
Top Bottom