Results 1 to 8 of 8
  1. #1
    tngirl is offline Novice
    Windows XP Access 2003
    Join Date
    May 2013
    Posts
    20

    Question Counting in

    I am creating a Report and need to count the values for the FinalScoreID. I added the FinalScoreID field from the field list for the report. Value 1 = Yes and Value 2 = No. I need a count for each yes and each no. I thought this is what I needed in the Control Source for the field on the report for the query, but it is not working. Any help you can give is greatly appreciated.

    =Count([FinalScoreID])=1


    =Count([FinalScoreID])=2

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    This type of thing:

    =Sum(IIf([FinalScoreID]=2, 1, 0))
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    tngirl is offline Novice
    Windows XP Access 2003
    Join Date
    May 2013
    Posts
    20
    Quote Originally Posted by tngirl View Post
    I am creating a Report and need to count the values for the FinalScoreID. I added the FinalScoreID field from the field list for the report. Value 1 = Yes and Value 2 = No. I need a count for each yes and each no. I thought this is what I needed in the Control Source for the field on the report for the query, but it is not working. Any help you can give is greatly appreciated.

    =Count([FinalScoreID])=1
    =Count([FinalScoreID])=2
    When I use =Sum(IIf([FinalScoreID]=2, 1, 0)), I get an error saying Circular Reference. I was wondering, would I use this same format if I was using the text work rather than the code, I tried this but it would not work either. I thought this would be so easy but I'm finding it is not. Any help you can provide is greatly appreciated. Thank you so much.

    =Sum(IIf([FinalScoreID]=Yes, 1, 0)),

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    need to count the values for the FinalScoreID
    What does this mean? That the game is over and the scores a final? What values are allowed? Examples of data?



    You might try:
    =Count([FinalScoreID] = 1)
    =Count([FinalScoreID] = 2)

    Note the end parenthesis position

  5. #5
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    Make sure a textbox doesn't have the same name as the field.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  6. #6
    tngirl is offline Novice
    Windows XP Access 2003
    Join Date
    May 2013
    Posts
    20
    Thanks so much, it is working

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    One of us was happy to help.

    You might clarify for future users what you were able to get working.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Another was happy to help, also. (if I did)

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

Similar Threads

  1. Counting
    By GeirA in forum Queries
    Replies: 7
    Last Post: 02-29-2012, 02:58 PM
  2. Counting Help
    By Jessyx in forum Access
    Replies: 1
    Last Post: 12-03-2011, 01:34 AM
  3. Crazy Counting
    By gbharris in forum Queries
    Replies: 1
    Last Post: 08-31-2011, 03:07 PM
  4. Counting
    By rfs in forum Forms
    Replies: 0
    Last Post: 03-15-2011, 03:20 PM
  5. Distinctive counting, can I do it?
    By Schon731 in forum Queries
    Replies: 5
    Last Post: 12-30-2010, 02:52 PM

Tags for this Thread

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