Results 1 to 7 of 7
  1. #1
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155

    Count()


    In the attached Report I have given the formula for Count as COUNT([CR NO]). It is coming as 14. I want it to be 11 which is the actual CR NO seen in the Report. How to do it?
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Probably have to build a query that returns only 11 distinct records then Count on that query.

    Here is a trick that might work.

    Set a group on CRNO. Put a textbox in group header: Name of tbxCntGrp, ControlSource =1, RunningSum set to OverGroup, can set Visible No.

    A textbox in report footer with ControlSource: =[tbxCntGrp].
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155
    Quote Originally Posted by June7 View Post
    Probably have to build a query that returns only 11 distinct records then Count on that query.

    Here is a trick that might work.

    Set a group on CRNO. Put a textbox in group header: Name of tbxCntGrp, ControlSource =1, RunningSum set to OverGroup, can set Visible No.

    A textbox in report footer with ControlSource: =[tbxCntGrp].
    Thanks a Lot! The trick worked. RunningSum should be set to OverAll. GOD BLESS YOU!!!

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    Interesting, OverGroup worked in my test.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155
    Quote Originally Posted by June7 View Post
    Interesting, OverGroup worked in my test.

    I put a Text box in the CR Header and entered =1 in it. When I gave OverGroup it showed 1 in the text boxes of each record. When I gave OverAll it showed 1 2 3 .... serially for each record.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    I did not test with your db, used mine. So still interesting. But glad it's working.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  7. #7
    Kundan is offline Competent Performer
    Windows XP Access 2013 32bit
    Join Date
    Mar 2018
    Posts
    155
    Quote Originally Posted by June7 View Post
    I did not test with your db, used mine. So still interesting. But glad it's working.
    The dicrepancy may be because I prepared my report through Report Wizard. While preparing the report I had put grouping to CR NO. After reading your advice I again grouped it. Because of this double grouping this discrepancy may have arisen.

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

Similar Threads

  1. Replies: 4
    Last Post: 01-15-2019, 11:50 AM
  2. Replies: 6
    Last Post: 06-20-2017, 08:56 AM
  3. Replies: 2
    Last Post: 06-30-2016, 06:38 PM
  4. Replies: 2
    Last Post: 04-15-2014, 01:59 PM
  5. COUNT Group Count Records COUNT FUNCTION
    By PMCOFFEY in forum Access
    Replies: 9
    Last Post: 11-09-2012, 09:40 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