Query Table Sum?

AC5FF

Registered User.
Local time
Today, 05:11
Joined
Apr 6, 2004
Messages
552
With the help from many people here I just about got my query/reports working just as i need. But I think i made one task a little more difficult than it needs to be.

I have a 'quota' table; columns are: Product, Jan, Feb, Mar, etc...
In the query that tells me how I am doing for the month, I was compairing this month's quota w/this month's production. Now I have to change that to give a running total. The production side is easy, but the quota side could probably use a little 'normalizing' :cool: (I'm learning good DB talk!)

I need to add up all the columns per product in my quota table. Right now the query does it by : [quota]![jan]+[quota]![feb]... etc...
Not that I should complain, because this is working just as I need it, but if there is a simpler way of accomplishing this I would really like to know.

Thanks!
 
Like you said, you have a design problem.
You should have a Month field in your quota table. Adding up all months will be a lot easier!
 
Guus2005;
I'm not sure I fully understand what you mean. I do have a month field in my quota table, i have 12 actually. Or, am I missing something here?

This part of the DB is still being added and tweaked. It would be real easy to change things around if there is a better way.
 
Your structure is not normalised. You should read up on the subject. You should not have 12 columns, you should use a related table and have one record for each month. This will have three (or more) fields. One is the product ID, one is the month and one is the value.
 

Users who are viewing this thread

Back
Top Bottom