Calculations

johnbowser11

Registered User.
Local time
Today, 17:02
Joined
Apr 26, 2005
Messages
13
Hi ive made a query but instead of calculating the total at the end of each line I want it to add up the total quantity at the end.
For example:

ID Description Quantity
ID Description Quantity
ID Description Quantity
ID Description Quantity
ID Description Quantity

How do i get the query to add up all of those quantities?
 
if you want any grouping, use a total query, or else you may use the DSum() function.
 
Sorry can you give a bit more detail, or an example as im a bit of a beginner!
Just to clarify im after the following


ID Description Quantity Total
001 Whatever 5 5
002 Whatever 6 11
003 Whatever 5 16
004 Whatever 2 18

The "Total" field being the one doing the calculation, but what?
 
do you want to do that at query or form level ?

If you want to make it at form level, simply create an unbound text box, and put =DSum([FieldName], "QueryName")
 
no sorry at query level.
Basically my query asks me to enter the items batch number which then returns a list of items with that batch number and the quantity of each so I want it to be able to add all of the quantity coloumn up!
 
Why at query level? It's very difficult (though not impossible) in a query. Surely you are displaying the results in a form?

It's even easier in a report which supports a running total.
 

Users who are viewing this thread

Back
Top Bottom