I used query design, added the table and then am writing this as an expression in the one field.
BTW I truly appreciate all of your help. Unfortunately removing the final & and closing quotes did not work either.
User Profile
Collapse
-
Hmm.. still not working. Getting the error "You tried to execute a query that does not include the specified expression 'Dsum.........' as part of an aggreagate function" again.
I also tried removing the ' quotes around Quarter (below) since Quarter is numeric YYYYQ. In this version I am getting the error "The expression you entered has an invalid string. A string can be up to 2048 characters long, including...Leave a comment:
-
-
The issue seems to be in joining the two statements because I've also tested the below statement and this works correctly:
Code:Running Total: DSum("[TotalAmount]","groupByQuarter","[Qrtr]<=" & [Qrtr] & "")Leave a comment:
-
Just tried that and got the error below:
"You tried to execute a query that does not include the specified expression 'Dsum.........' as part of an aggreagate functionLeave a comment:
-
Yes, there are multiple years but in format YYYYQ and formatted as a numberfield.
The below works when just using ID criteria but when I add the AND statement the first Qrtr field is getting syntax error.
Code:DSum("[TotalAmount]","groupByQuarter","[ID]='" & [ID] & "'" AND "[Qrtr]<=" & [Qrtr] )Leave a comment:
-
Access DSUM on Multiple Criteria
I'm trying to do a running sum in access based on two different criteria.
I have an ID, Quarter, and TotalAmount. For each ID and Quarter combination I want to see the running total (e.g. Claim ID 1 for Q1 and Q2 with Q2 being the sum of Q1 and Q2 values)
I've tried a bunch of different codes, but nothing is working. Here's what I have right now:
...Code:=DSum([TotalAmount],"groupByQuarter","[ID]
No activity results to display
Show More
Leave a comment: