473,385 Members | 1,392 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Totaling different field types

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
2 2235
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Johann Uhrmann | last post by:
Hello, are there any experiences about the performance of indices with different data types. How do the performance of an index that consists of - an integer field - a varchar() field - a...
8
by: Myron Marston | last post by:
For a WebService I am developing, I return a DataSet that contains a table listing Field Names and Field Values. The FieldValue column is given the type object becuase it can potentially contain...
10
by: Arno R | last post by:
Hi all, I have a database that I need to use in different versions of Access. This is A97 in most places and A2k in a few other locations. (I develop in A97 and convert the db to A2k for these...
8
by: AAJ | last post by:
Hi all I would like to have a class that can set/return values of different datatype via a single accessor, i.e. overload the accessor i.e. something like DateTime m_DateValue; string...
3
by: Divvie46 | last post by:
Hi All, I have created a form that calculates a total of certain fields. All fields are in the format "real". My total however does not work if any of my fields are left blank. In other...
4
by: NormAmst | last post by:
I have a list of CPU processing times and job durations for an entire department at work. There are 3 classifications I am maintaining. CPU time during peak hours , CPU time during non peak hours...
5
by: JRNewKid | last post by:
I have an Access report and in the body of the report there is a calculation: =DateDiff("n",,)/60 This is in a field called dlyElapsedTime. at the end of the report I want to have a total of...
3
by: Constantine AI | last post by:
Hi can anybody help me with this problem? I have a customer order form with a sales order line subform. The subform contains products ordered by customers, each (wooden) product can come in two...
2
by: Coxmg | last post by:
I have several related tables. One table lists orders with due dates for SKUs while another table lists components of a SKU (diamonds). A third related table lists diamond IDs and diamond inventory....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.