Results 1 to 3 of 3
  1. #1
    Bill the Cat is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2019
    Location
    Virginia
    Posts
    16

    Query field sum problem

    Greetings! I have an Expression field in a query that sums the number of checkboxes in my table for a specific field called "Not Scored".

    TotalNotScored: Sum(Abs([Requirement_Not_Scored]))



    I have another Expression field that counts "Other than Satisfied" checkboxes:

    TotalOther: Sum(Abs([Requirement_Other_Than_Satisfied]))


    Due to some changing mission requirements, there is a scenario where both checkboxes can be checked. I need my "Not Scored" field to only count records that Other than Satisfied is not also checked. How do I tell my query to look for all Not Scored and then ignore the records that have "Other than Satisfied" also checked?


    Thanks in advance

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    49,760
    Try:

    Sum(IIf(Not [Other than Satisfied], Abs(Requirement_Not_Scored),0))
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Bill the Cat is offline Novice
    Windows 10 Access 2016
    Join Date
    Dec 2019
    Location
    Virginia
    Posts
    16
    Quote Originally Posted by June7 View Post
    Try:

    Sum(IIf(Not [Other than Satisfied], Abs(Requirement_Not_Scored),0))
    Worked perfectly! Thank you so much!!

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

Similar Threads

  1. Replies: 4
    Last Post: 02-07-2017, 02:40 PM
  2. Problem with append query for attachment field
    By ahmadrezaahmad in forum Queries
    Replies: 9
    Last Post: 06-29-2013, 09:08 PM
  3. Replies: 1
    Last Post: 05-05-2010, 01:54 AM
  4. Replies: 2
    Last Post: 09-26-2009, 07:19 AM
  5. Replies: 3
    Last Post: 06-03-2009, 07:15 AM

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 - Senior Forums