• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 656
  • Last Modified:

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;
0
bayouexpert
Asked:
bayouexpert
1 Solution
 
jefftwilleyCommented:
Give this a go

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

assuming you're doing this in Access (Dsum being an access function)

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

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now