Hale, Jim
Jim.Hale at FleetPride.com
Wed Oct 25 16:35:03 CDT 2006
Here is some a method from a query samples database I got from Lord knows where. HTH Jim Hale SELECT [Order Details].OrderID, Sum([UnitPrice]*[Quantity]*(1-[Discount])) AS OrderTotal, (SELECT Sum(UnitPrice*Quantity*(1-Discount)) FROM [Order Details] OD WHERE OD.OrderID <= [Order Details].OrderID) AS RunningTotal FROM [Order Details] GROUP BY [Order Details].OrderID; -----Original Message----- From: John Skolits [mailto:askolits at ot.com] Sent: Wednesday, October 25, 2006 3:23 PM To: 'Access Developers discussion and problem solving' Subject: [AccessD] Running sum in a query without DSUM Any way to do a running sum in a "query" without having to deal with the overhead of a domain function (Like DSUM)? *********************************************************************** The information transmitted is intended solely for the individual or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of or taking action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you have received this email in error please contact the sender and delete the material from any computer. As a recipient of this email, you are responsible for screening its contents and the contents of any attachments for the presence of viruses. No liability is accepted for any damages caused by any virus transmitted by this email.