Results 1 to 4 of 4
  1. #1
    Join Date
    Mar 2004
    Posts
    69

    Unanswered: pass/fail report percentage

    I've got a report which show's drugs and alcohol tests which have a string feild which is either Passed or Failed. I now need to show at the end of the report a % passed rating. Could some one point me in the right direction please. Thanks

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by ISLMAN1975
    I've got a report which show's drugs and alcohol tests which have a string feild which is either Passed or Failed. I now need to show at the end of the report a % passed rating. Could some one point me in the right direction please. Thanks
    This is relatively easy but it depends on how your data and report are constructed.
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Mar 2004
    Posts
    69
    Think I know how i'm going to do this. But im stuck on using the DCOunt function to count how many of the records have "Pass" in the result Feild. My table is called DrugsAlcoholtests and has three fields DrugsAlcoholTestID which is the primary key EmployeeID and result which is a text feild which will be either "Pass" or "Fail" or Null. How do I use the DCount function to get the number of records which have "Pass".

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Use SUM along with COUNT in the section footer to derive your percentage:

    PassCount: =Sum(iif([yourField] = "Pass", 1, 0))
    RecordCount: =Count([yourField])
    PassPercentage: =([PassCount]/[RecordCount])
    oh yeah... documentation... I have heard of that.

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

Posting Permissions

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