Results 1 to 5 of 5
  1. #1
    kid is offline Novice
    Windows 10 Access 2007
    Join Date
    Jan 2020
    Posts
    20

    Split data N records in Group wise

    I have a table with more than 5000 rows. I want split this data into a batch (20 per batch) based on two criteria columns TEAM_ID and TEAM_CATEGORY.


    For example if a batch has 45 members then it should split as 20+20+5.

  2. #2
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,402
    Where does the result of the split reside? How to differentiate one split from another? Example data required with end result shown.

  3. #3
    kid is offline Novice
    Windows 10 Access 2007
    Join Date
    Jan 2020
    Posts
    20
    Quote Originally Posted by davegri View Post
    Where does the result of the split reside? How to differentiate one split from another? Example data required with end result shown.
    The new split data append in new table

  4. #4
    davegri's Avatar
    davegri is offline Excess Access
    Windows 10 Access 2016
    Join Date
    May 2012
    Location
    Denver
    Posts
    3,402
    Quote Originally Posted by davegri View Post
    How to differentiate one split from another? Example data required with end result shown.
    Why won't the new table look just like the old table? Again, what will differentiate the splits from each other and from the original?
    Without this information, we're at a dead end.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    Have you considered just trying a report that is sized to print exactly 20 records per page and to force a page break after each group? Well, I guess 5000 records would be a rather lengthy report.

    Otherwise, will likely need code that assigns a group identifier for each set of 20 records within each grouping of TEAM_ID and TEAM_CATEGORY.

    Provide sample data and desired result. If you want to provide db for analysis, follow instructions at bottom of my post.

    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.

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. Replies: 0
    Last Post: 02-25-2013, 04:43 PM
  3. Month wise two years data comparison
    By waqas in forum Reports
    Replies: 2
    Last Post: 07-06-2012, 08:35 AM
  4. Replies: 2
    Last Post: 06-21-2012, 07:40 PM
  5. Replies: 0
    Last Post: 02-09-2011, 03:10 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