Results 1 to 4 of 4
  1. #1
    Huddle is offline Competent Performer
    Windows XP Access 2010 64bit
    Join Date
    Jun 2010
    Posts
    318

    Unhappy Countif would make it so easy.

    I am trying to count the number of records that have criteria of FSL = 0, 1, 2, 3 and 4. After research this I found a way to do this was make a calculating IIf field then have a seperate field do the count. This is what I've done but it is not working. Any suggestions.

    =IIf([FSL]=0,1,0) (named this field 0CountCal)
    =Count([0CountCal])

    Used the same formulas for 1,2,3 and 4

  2. #2
    Robeen is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Mar 2011
    Location
    Tulsa, Oklahoma.
    Posts
    1,596
    Are you doing this in a Query?
    Do you need a count for EACH of the FSL numbers?
    Eg:
    FSL Count
    15
    1 27
    2 5
    3 17
    4 98

    Is that kind of what you need?

  3. #3
    orange's Avatar
    orange is online now Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,849
    SELECT Count(FSL) AS CountOfFSL, FSL
    FROM YourTableName
    GROUP BY FSL
    HAVING (((FSL) In (0,1,2,3,4)));



    A query along these lines should work, assuming FSL is a numeric datatype

  4. #4
    Huddle is offline Competent Performer
    Windows XP Access 2010 64bit
    Join Date
    Jun 2010
    Posts
    318
    I'm doing this in a sub report in unbound fields. I figured I'll have to do the calculations in the subreport then put it in the main report. I've attached an example. Just another one of my messes.
    Attached Files Attached Files

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

Similar Threads

  1. Countif in Access
    By Rosekv in forum Access
    Replies: 1
    Last Post: 06-19-2013, 05:58 AM
  2. Tips to make access database easy to maintain
    By alsaf in forum Programming
    Replies: 9
    Last Post: 12-11-2011, 01:51 PM
  3. Advanced CountIf Query
    By therzakid in forum Queries
    Replies: 2
    Last Post: 07-27-2011, 10:45 PM
  4. Replies: 0
    Last Post: 03-29-2011, 09:37 AM
  5. Similar to countif
    By JonHFL in forum Access
    Replies: 2
    Last Post: 06-04-2010, 10:55 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