Adding Values for Multiple departments

slovell

Registered User.
Local time
Today, 05:13
Joined
Sep 7, 2007
Messages
15
Hi,
This may be a dumb question, but I've got kind of a question about adding values.

I have a subform that contains a department name, and it's waste totals (in Kilograms) for the day, for a particular company. The company information is the main form.

Whenever I start a new department, the totals, and category names start blank (different departments could produce different waste).

I'm trying create a query that gives me the total value for each Category of waste. However, I keep getting all the seperate values returned?? As apposed to a total. For example.

Company A has two departments:
Office and Production.
For Office they had 20 Kg of plastic bottles and Production had 20 Kg of plastic bottles.
I want to be able to total the weight of plastic bottles...it's just not working../
?
Any advice?
 
I'm trying create a query that gives me the total value for each Category of waste. However, I keep getting all the seperate values returned?? As apposed to a total.
Trust me, this is not a dumb question...:)

You have to group separate queries by each category with a SUM() column in each. Then you have to UNION the records from each query. This is the way I do it. There may also be some Basic code you can write to shorten this process, but I have not seen or heard of it yet.

I just provided a sample of this to another person. You can look at it HERE.
 

Users who are viewing this thread

Back
Top Bottom