I'm using access97. I have a query in which I have many fields. Building, room number, chemical, quantity are four of the many fields that I have in the query. As of right now I am grouping by buildings , room numbers and chemicals. That works just fine but I can't figure out how to keep a running sum of each chemical in a building.
Here's my example of how the query looks now:
Onyx (building), 12 (room#), boric acid, 200g
Onyx (building), 110 (room#), boric acid, 300g
Cascade (building), 23 (room#), acetone, 500ml
Cascade (building), 56 (room#), acetone, 1000ml
Here's what I want:
Onyx (building), 12 (room#), boric acid, 200g
Onyx (building), 110 (room#), boric acid, 300g
total boric acid in Onyx = 500g
Cascade (building), 23 (room#), acetone, 500ml
Cascade (building), 56 (room#), acetone, 1000ml
total acetone in Cascade = 1500ml
Here's the problem:
I can't get the query to display individual chemicals and the total amount of those chemicals in the same query. It will work fine if I remove the room number field but that defeats the purpose of my query. I want to be able to display all the chemicals in a building and the running total quantities of individual chemicals. Is there a way to do this? Will some code be required here?
Bye the way, I want to be able to do this so I can print the chemicals and running total in a report. This seems to work really well in Excel but can't do it in Access.
Hope this is enough info...
Thanx
Gustavson
Here's my example of how the query looks now:
Onyx (building), 12 (room#), boric acid, 200g
Onyx (building), 110 (room#), boric acid, 300g
Cascade (building), 23 (room#), acetone, 500ml
Cascade (building), 56 (room#), acetone, 1000ml
Here's what I want:
Onyx (building), 12 (room#), boric acid, 200g
Onyx (building), 110 (room#), boric acid, 300g
total boric acid in Onyx = 500g
Cascade (building), 23 (room#), acetone, 500ml
Cascade (building), 56 (room#), acetone, 1000ml
total acetone in Cascade = 1500ml
Here's the problem:
I can't get the query to display individual chemicals and the total amount of those chemicals in the same query. It will work fine if I remove the room number field but that defeats the purpose of my query. I want to be able to display all the chemicals in a building and the running total quantities of individual chemicals. Is there a way to do this? Will some code be required here?
Bye the way, I want to be able to do this so I can print the chemicals and running total in a report. This seems to work really well in Excel but can't do it in Access.
Hope this is enough info...
Thanx
Gustavson