Results 1 to 3 of 3
  1. #1
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496

    Count the number of a group in a recordset

    I have a recordset loop that loops until the .eof

    I need to count the number of areas, each record has an area ID number and I need to count them grouped

    so if

    north 1
    south 2
    east 2



    then I have 2 areas

    is there a way to count these through the recordset?

  2. #2
    amrut is offline Expert
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Dubai
    Posts
    614
    Use a group by query instead of looping recordset to count the records over group. If you do require to loop through recordset, you can use this query or its SQL as recordset.

  3. #3
    Ruegen's Avatar
    Ruegen is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jul 2013
    Location
    Australia
    Posts
    1,496
    Quote Originally Posted by amrut View Post
    Use a group by query instead of looping recordset to count the records over group. If you do require to loop through recordset, you can use this query or its SQL as recordset.

    Not for this option, I need all records then tally at the same time. I have found a solution anyway and will post the code later.

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

Similar Threads

  1. Replies: 4
    Last Post: 07-24-2013, 02:34 PM
  2. COUNT Group Count Records COUNT FUNCTION
    By PMCOFFEY in forum Access
    Replies: 9
    Last Post: 11-09-2012, 09:40 PM
  3. Replies: 5
    Last Post: 09-14-2012, 04:56 PM
  4. Replies: 8
    Last Post: 03-14-2012, 05:40 PM
  5. Replies: 6
    Last Post: 07-25-2011, 01:54 PM

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