Results 1 to 3 of 3
  1. #1
    Bkper087 is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    May 2014
    Posts
    81

    DSUM with multiple criteria including a Yes/No field

    Not sure what I'm doing wrong here. This is returning a total sum of all "totalcost" fields and ignoring the criteria. It works without the And "[StaffEarmark]=TRUE" portion. Any help?


    =DSum("[TotalCost]","[qryExpense_Actual]","[EventIDfk]=" & [EventsID] And "[StaffEarmark]=TRUE")

  2. #2
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Quote in the wrong place:
    =DSum("[TotalCost]","[qryExpense_Actual]","[EventIDfk]=" & [EventsID] & " And [StaffEarmark]=TRUE")

  3. #3
    Bkper087 is offline Advanced Beginner
    Windows 7 64bit Access 2016
    Join Date
    May 2014
    Posts
    81
    Works like a charm. thanks.

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

Similar Threads

  1. DSUM with multiple criteria
    By Bkper087 in forum Access
    Replies: 4
    Last Post: 02-13-2017, 10:19 PM
  2. Replies: 3
    Last Post: 08-25-2016, 09:12 AM
  3. DSum with multiple criteria not resetting
    By ms13103 in forum Queries
    Replies: 3
    Last Post: 02-04-2016, 09:34 AM
  4. Replies: 5
    Last Post: 11-30-2014, 08:12 PM
  5. Replies: 11
    Last Post: 04-30-2012, 07:22 PM

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