Running Totals with a difference

  • Thread starter wwwredback via AccessMonster.com
  • Start date
W

wwwredback via AccessMonster.com

Hi all,

I am trying to display some results within a form which I use to create
invoice(orders) so it is used as a running total to date for each customer.

Here is the code I have used:


Qry_GroupOrders_ForTotals

SELECT Sum([Order Details Extended].ExtendedPrice) AS SumOfExtendedPrice,
Orders.OrderID, Orders.CustomerID
FROM [Order Details Extended] INNER JOIN Orders ON [Order Details Extended].
OrderID=Orders.OrderID
GROUP BY Orders.OrderID, Orders.CustomerID
ORDER BY Orders.CustomerID;

Then I’ve got a separate query which finds the information from the above
query called:

qry_RunningTotal

SELECT Sum(qry_GroupOrders_ForTotals.SumOfExtendedPrice) AS
SumOfSumOfExtendedPrice, qry_GroupOrders_ForTotals.CustomerID
FROM qry_GroupOrders_ForTotals
GROUP BY qry_GroupOrders_ForTotals.CustomerID
ORDER BY qry_GroupOrders_ForTotals.CustomerID;

This then gives the totals per customer for all their orders.


The questions are:

1. How do I display this result in the form without it blocking data entry
and
2. Also the 2 queries will need to be refreshed for every invoice (order)
created.

Any help will be gratefully received.

Thanks

James.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top