By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,651 Members | 1,694 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,651 IT Pros & Developers. It's quick & easy.

Totaling different field types

P: n/a
In table A I have a field called Color.

I have a color report that groups the colors and prints the total.
One section will list and total all the records that have red in the
color field, one section will list and total all the records that have
blue in the color field, ect. I need on the grand total page to print
a summary of the previous counts.

Total Red ____
Total Blue _____
Total Yellow ____

I use record count in the grouping and it is working ok. I just can't
get the totals to print on the grand total page. How do I do this?

Feb 7 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Ryker wrote:
>In table A I have a field called Color.

I have a color report that groups the colors and prints the total.
One section will list and total all the records that have red in the
color field, one section will list and total all the records that have
blue in the color field, ect. I need on the grand total page to print
a summary of the previous counts.

Total Red ____
Total Blue _____
Total Yellow ____

I use record count in the grouping and it is working ok. I just can't
get the totals to print on the grand total page. How do I do this?

Quick and dirty:
=Count(IIf(Color="Red", 1, Null))
But then, what will you do when you have a new color?

Better to create a Totals type query that calculates all the
totals:
SELECT Color, Count(*) As ColorCount
FROM table
GROUP BY Color

Then create a new report to display the query's data and use
this report as a subreport.

--
Marsh
Feb 7 '07 #2

P: n/a
On Feb 7, 2:06 pm, Marshall Barton <marshbar...@wowway.comwrote:
Ryker wrote:
In table A I have a field called Color.
I have a color report that groups the colors and prints the total.
One section will list and total all the records that have red in the
color field, one section will list and total all the records that have
blue in the color field, ect. I need on the grand total page to print
a summary of the previous counts.
Total Red ____
Total Blue _____
Total Yellow ____
I use record count in the grouping and it is working ok. I just can't
get the totals to print on the grand total page. How do I do this?

Quick and dirty:
=Count(IIf(Color="Red", 1, Null))
But then, what will you do when you have a new color?

Better to create a Totals type query that calculates all the
totals:
SELECT Color, Count(*) As ColorCount
FROM table
GROUP BY Color

Then create a new report to display the query's data and use
this report as a subreport.

--
Marsh
That worked great. Thanks for your help!

Feb 8 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.