DSUM and Date Problem

q582gmzhi

Registered User.
Local time
Today, 23:24
Joined
Dec 23, 2002
Messages
48
Hi,

I have been reading through the boards and managed to get this far but I have been stuck on the same problem for hours, so I am now asking for help.

I need to create a YTD running total:

Fields:
Period, Units
01/01/2006, 10
01/02/2006, 20

UnitsYTD: DSum("[Units]","tblAdjControlLog_YTD","[Period] <=#" & [Period] & "#")

I have managed to get to this point and now seem to be stumped after several hours of trying different approaches.

The query keeps returning the following results:
Period, Units, UnitsYTD
01/01/2006, 10, 60
01/02/2006, 20, 60
01/03/2006, 30, 60

Instead of:
Period, Units, UnitsYTD
01/01/2006, 10, 10
01/02/2006, 20, 30
01/03/2006, 30, 60

Thanks in advance

Daz......
 
Look at "DemoRunSumA2000.mdb",
Open Form1 and click on command button.
 

Attachments

Users who are viewing this thread

Back
Top Bottom