Results 1 to 3 of 3

Thread: How to count

  1. #1
    Join Date
    Jul 2004

    Unanswered: How to count


    I'd like to know if somebody could help me with a question I have about access. We have made a survey on our company and many of the fields the answers are YES or NO. For example, in one table, there's the field "First time visit". I can make a query to sort out all the YESs or NOs. But, how can I add up all the YES or NO so I will find out how many people answered YES and how many people answered NO. And also, how can I generate the percentage of it.



  2. #2
    Join Date
    Mar 2003
    The Bottom of The Barrel
    Provided Answers: 1
    count: =sum(iif(yourField = -1, 1, 0))
    percentage: =(sum(iif(yourField = -1, 1, 0))) / count(yourField))
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Jul 2004

    Type mismatch

    I tried using the proposed expressions, but everytime I run it I get the message: "Data type mismatch in criteria expression". How can this be solved?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts