Queries not counting

gigifarrow
gigifarrow used Ask the Experts™
on
I have a table that I need totals of Serial numbers and Models. I hit the sum button and then the fields I want to count I put "count" for those fields. When I run the query It just gives me ones in the fields that I want to count. It is not totaling. I cant figure out what Im doing wrong. Enclosed is my database with the table and the query.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Scott McDaniel (EE MVE )Infotrakker Software
Most Valuable Expert 2012
Top Expert 2014

Commented:
You didn't include your database, but to SUM you must be sure to GROUP properly. In most cases, if you're referring to SerialNumbers, those would be unique, and therefore the COUNT would always be 1.

What do you wish to "count" - the number of Models, or the number of SerialNumbers (or both)?

Author

Commented:
Sorry here it is . I need totals for both the serial numbers and the model numbers.
productionreportquery-10-Apr-12v.accdb
Scott McDaniel (EE MVE )Infotrakker Software
Most Valuable Expert 2012
Top Expert 2014

Commented:
What do you mean by "totals for the serial number". A Serial Number is unique in most cases. What sort of "totals" would you need?

Same for Model Numbers? What sort of totals are you talking about?

I'll be glad to help you with this, but you need to provide the context in which those counts/totals are to be made.

Author

Commented:
Okay sorry if I didnt explain it very well. You have a car with the model number,"M2A3". There are say 4 models that have different model numbers. Example:


Model Number
1. M2A3
2. M2A4
3. M2A5
4, M2A5
 

In this case you have a total of 4 models. Then I need the break down of how many of each model number in this example I have a total of 2 model M2A5. and  1 M2A3 and 1 M2A4.

For the serial numbers they are different but I need the totals of the serial numbers that are entered.
Infotrakker Software
Most Valuable Expert 2012
Top Expert 2014
Commented:
The query below would give you the Count of the number of Distinct Models in tblMODHistory:

SELECT tblMODHistory.Model, Count(tblMODHistory.Model) AS CountOfModel
FROM tblMODHistory
GROUP BY tblMODHistory.Model;

Same with the Serial Numbers, I suppose:

SELECT tblMODHistory.[Vehicle Serial Number], Count(tblMODHistory.[Vehicle Serial Number]) AS [CountOfVehicle Serial Number]
FROM tblMODHistory
GROUP BY tblMODHistory.[Vehicle Serial Number];

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial