Results 1 to 4 of 4
  1. #1
    ms13103 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2016
    Posts
    2

    DSum with multiple criteria not resetting


    My query resets the DSum running total (RT) when the ITEM_ID changes, but it doesn't reset when the LOC_ID changes like in the 3rd record below where it's RT should show as 193. I have also tried using Net Forecast Week in my trials and errors. It took me a long time to get this far with all the syntax and single/double quotes.

    RT: DSum("[NF Qty]","Net Forecast by Item by Week","[Auto ID]<=" & [Auto ID] & " And [ITEM_ID]='" & [ITEM_ID] & "'" And [LOC_ID]='" & [LOC_ID] & "'")

    ITEM_ID LOC_ID Net Forecast Week NF Qty RT
    87-635F263 BN 201652 692 34418
    87-635F263 BN 201653 693 35111
    87-635F263 JD 201606 193 35304

    Thanks for your help!

    Tom

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Close but no cigar. Try

    RT: DSum("[NF Qty]","Net Forecast by Item by Week","[Auto ID]<=" & [Auto ID] & " And [ITEM_ID]='" & [ITEM_ID] & "' And [LOC_ID]='" & [LOC_ID] & "'")
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    ms13103 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Feb 2016
    Posts
    2
    Thanks Paul!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Happy to help and welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Help me ! using Dsum with criteria day
    By dahota in forum Forms
    Replies: 4
    Last Post: 06-25-2015, 11:05 AM
  2. Value from DSUM with multiple criteria wrong
    By maxmaggot in forum Reports
    Replies: 4
    Last Post: 04-12-2014, 05:21 PM
  3. Using DSUM resetting upon next ID in dataset
    By ellisjo3 in forum Queries
    Replies: 18
    Last Post: 01-13-2014, 09:24 AM
  4. dsum with criteria Not like 38,39,40,41
    By sdel_nevo in forum Programming
    Replies: 3
    Last Post: 06-13-2013, 03:23 PM
  5. How to use a create a DSum with multiple criteria
    By FlyingDisc in forum Reports
    Replies: 1
    Last Post: 01-05-2011, 08:31 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums