Calculate Total of a Table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two fields, one is Quantity field and the other one is the price field, I want to calculate the total quantity of
each record, which is Quantity * Price and add all these records up to get the complete total. To make it clearer
I want to add records one (Quantity * Price) with Records 2 (Quantity * Price) until the last recor
 
Write a query with a calculated column:

ExtendedPrice: ([Quantity] * [Price])

Then you either write a second query (a Totals Query) or use Running Sum on
the ExtendedPrice field in a report. If using a Totals Query, the syntax
would look like:

qry1:
SELECT ID, ([Quantity]*[Price]) AS ExtendedPrice
FROM Table1;

qry2:
SELECT Sum([ExtendedPrice]) AS SumOfExtendedPrice
FROM qry1;
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

George said:
I have two fields, one is Quantity field and the other one is the price
field, I want to calculate the total quantity of
each record, which is Quantity * Price and add all these records up to get
the complete total. To make it clearer,
 
Back
Top