Link to home
Start Free TrialLog in
Avatar of bayouexpert
bayouexpertFlag for United States of America

asked on

DSum Running Total Date Criteria

After 2 hours of attempting to get the Dsum function to create a running total, I am turning to EE.

The below SQL results in a null value in the running total column.  If I remove the criteria from the DSum function, I receive a total, but not a running total.  With that said, I obviously have an error in criteria syntax.

SELECT qryProgress_Receive_SJ_Bare.ReceiveDate, qryProgress_Receive_SJ_Bare.[Bare DRL Unloaded], DSum("[Bare DRL Unloaded]","qryProgress_Receive_SJ_Bare","[ReceiveDate] <=" & [ReceiveDate] & "") AS [Total Bare DRL Unloaded]
FROM qryProgress_Receive_SJ_Bare;
ASKER CERTIFIED SOLUTION
Avatar of jefftwilley
jefftwilley
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bayouexpert

ASKER

The actual criteria is..."[ReceiveDate] <= #" & [ReceiveDate] & "#"
PS.  You had left off the closing quote after the last # sign.  Thanks for the help.