Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2011
    Posts
    33

    Unanswered: Counting in a report

    Hello,

    I have a question, probably very simple but I have spent the last few hours trying to work this out but I can't seem to get it.

    I have three fields (datatype is number - i used number as I wish to have null values in some cases):

    CallAttemptOne
    CallAttemptTwo
    CallAttemptThree

    I have these set up as Yes and No option groups (Yes = 1, No = 2).

    What I want to do is total all of the individual calls made in a report, ie

    CallAttemptOne - yes = xx, no =xx
    CallAttemptTwo - yes = xx, no =xx
    CallAttemptThree - yes = xx, no =xx

    I would also like to have total number of calls made overall.

    So far I have tried:
    =Count([CallAttemptOne]=1)
    =Count(IIf([CallAttemptOne]=1))
    =Sum([CallAttemptOne]=1)

    Everything I try ends up getting #error

    Where I am going wrong / what am I not doing? Am I even on the right track?

    Thanks for taking the time to read this.

    Jeremy.

  2. #2
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    How about:

    =Sum(IIf([CallAttemptOne]=1, 1, 0))
    Paul

  3. #3
    Join Date
    Sep 2011
    Posts
    33
    Thanks pbaldy.

    It does work, however it only works in the detail section of the report. If i put it in the page footer i get the error and thats where i need the count to be.

    Any suggestions?

    Thanks again

  4. #4
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    That will work in a group or report footer. Getting it in a page footer is trickier:

    Summing in reports - Access - Office.com

    about half way down.
    Paul

  5. #5
    Join Date
    Sep 2011
    Posts
    33
    Actually, im an idoit. Report footer is what i want.

    Thanks very much pbaldy.

  6. #6
    Join Date
    May 2005
    Location
    Nevada, USA
    Posts
    2,888
    Provided Answers: 6
    No problem Jeremy.
    Paul

Posting Permissions

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