User Profile

Collapse

Profile Sidebar

Collapse
gdonn3008
gdonn3008
Last Activity: Sep 12 '19, 03:04 PM
Joined: Sep 10 '19
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • gdonn3008
    replied to Access DSUM on Multiple Criteria
    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.
    See more | Go to post

    Leave a comment:


  • gdonn3008
    replied to Access DSUM on Multiple Criteria
    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...
    See more | Go to post
    Last edited by NeoPa; Sep 13 '19, 11:49 PM. Reason: Please get with it!! [CODE] tags yet again.

    Leave a comment:


  • gdonn3008
    replied to Access DSUM on Multiple Criteria
    It's a text value as it is a mix of Letter and Numbers
    See more | Go to post

    Leave a comment:


  • gdonn3008
    replied to Access DSUM on Multiple Criteria
    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] & "")
    See more | Go to post
    Last edited by NeoPa; Sep 13 '19, 11:48 PM. Reason: Added the mandatory [CODE] tags.

    Leave a comment:


  • gdonn3008
    replied to Access DSUM on Multiple Criteria
    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 function
    See more | Go to post

    Leave a comment:


  • gdonn3008
    replied to Access DSUM on Multiple Criteria
    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] )
    See more | Go to post
    Last edited by twinnyfo; Sep 11 '19, 05:54 PM. Reason: added code tags and fixed smart quotes

    Leave a comment:


  • gdonn3008
    started a topic Access DSUM on Multiple Criteria

    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]
    ...
    See more | Go to post
    Last edited by gits; Sep 11 '19, 08:33 AM. Reason: added code tags
No activity results to display
Show More
Working...