Results 1 to 5 of 5
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919

    Number of records in a group


    Is there a VBA method that will yield the number of records in a group? I only see three with "Me." auto, "GroupHeader", "GroupFooter" and "GroupLevel".

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    by groups, do you mean within the context of a report?

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Why do you need VBA? Don't see how referencing those entities will help with counting records.

    If you are building a report, use report grouping and sorting settings. Put a textbox in group footer with an expression: =Count(*)
    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.

  4. #4
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Put a textbox in group footer with an expression: =Count(*)
    Thanks, that's all I needed.

  5. #5
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 10 Access 2013 32bit
    Join Date
    Feb 2011
    Posts
    1,919
    Yes, I need to toggle some header/footer visibility when there's only one record in the group.

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

Similar Threads

  1. Replies: 2
    Last Post: 11-26-2016, 01:07 PM
  2. Count the number of a group in a recordset
    By Ruegen in forum Programming
    Replies: 2
    Last Post: 05-22-2014, 10:41 PM
  3. Replies: 2
    Last Post: 03-28-2013, 05:59 PM
  4. Limit number of records in report by group
    By Dr Ennui in forum Reports
    Replies: 0
    Last Post: 06-22-2010, 12:36 AM
  5. Replies: 1
    Last Post: 03-12-2009, 09:55 AM

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