Results 1 to 9 of 9

Thread: Counting

  1. #1
    New Lounger
    Join Date
    May 2010
    Location
    Kitchener
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I hope somebody out there can tell me where I am going wrong. I have attached the access file here for you all to look at. What I am trying to do is count the number of times a certian entry is found.

    What I have is an form called "Agent Report Card" this is used to pick the person I want the information about

    This populates the query AgentReportCardCSAT" This is all the record for the person

    What I am trying to do is look at that query and on the report "AgentReportCardCSATSubreportofARC" i want to create the following boxes.

    - Total number of recors in the query - This I have completed

    - in the "QoSBoxes" cell on the report I want to count the number of times it Says "TopBox" - The cell will onloy say "TopBox", "MiddleBox","BottomBox"

    This is where I am having the trouble, I have tried using a Dcount expression but it does not want to work. I think it may be because I am trying to use the cell in the report and not the query, but I have tried that too and no go. I know this is a simple thing to do but I am at a total loss here. I am a little rusty on using access. What am I doing wrong.
    Attached Files Attached Files

  2. #2
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Pennsylvania, USA
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Corey Slauenwhite View Post
    I hope somebody out there can
    - in the "QoSBoxes" cell on the report I want to count the number of times it Says "TopBox" - The cell will onloy say "TopBox", "MiddleBox","BottomBox"

    on the report or form

    =Count(IIf[YourControl]="TopBox")

    =Count(IIf[YourControl]="MiddleBox")

    =Count(IIf[YourControl]="BottomBox")
    threecrow

    Don't make excuses. It's what you do, not why you didn't.

  3. #3
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    These are the expressions I would use:

    =Count("*") to get the grand total

    and these for the 3 subtotals

    =DCount("*","AgentReportCardCSAT","[QoSBoxes]='TopBox'")
    =DCount("*","AgentReportCardCSAT","[QoSBoxes]='MIddleBox'")
    =DCount("*","AgentReportCardCSAT","[QoSBoxes]='BottomBox'")
    Regards
    John



  4. #4
    New Lounger
    Join Date
    May 2010
    Location
    Kitchener
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    John,

    This is really wired. I have been tryning the DCount function thinking I was doing something wrong. I just happened to run your DCount formula and it did the same as mine. It made all my fields blank... I have been trying to figure this out all night... I just happened to click on one of the fields and the number appeared... I still do not know why when I go from design mode to view mode the report shows blank fields but when you click on them the information shows up

  5. #5
    New Lounger
    Join Date
    May 2010
    Location
    Kitchener
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ThreeCrow

    I tried this and it is telling me I am missing phrenthasis.

  6. #6
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    Pennsylvania, USA
    Posts
    144
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Apologizes, was on one those iPhone thingies.

    =Count(IIf([YourControl]="TopBox"))

    =Count(IIf([YourControl]="MiddleBox"))

    =Count(IIf([YourControl]="BottomBox"))
    threecrow

    Don't make excuses. It's what you do, not why you didn't.

  7. #7
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    Quote Originally Posted by Corey Slauenwhite View Post
    This is really wired. I have been tryning the DCount function thinking I was doing something wrong. I just happened to run your DCount formula and it did the same as mine. It made all my fields blank... I have been trying to figure this out all night... I just happened to click on one of the fields and the number appeared... I still do not know why when I go from design mode to view mode the report shows blank fields but when you click on them the information shows up
    I don't know what to suggest. That does not happen for me.

    If you open the report without starting from Design View what happens?
    Regards
    John



  8. #8
    New Lounger
    Join Date
    May 2010
    Location
    Kitchener
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    John,

    They are still blank but if I open to print preview they are populated...

  9. #9
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts
    Quote Originally Posted by Corey Slauenwhite View Post
    They are still blank but if I open to print preview they are populated...
    Print Preview is the view I use. What view are you using where they are blank?
    Regards
    John



Posting Permissions

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