Page 2 of 2 FirstFirst 12
Results 16 to 17 of 17
  1. #16
    knarfreppep is offline Competent Performer
    Windows 8 Access 2013
    Join Date
    Feb 2015
    Location
    Adelaide, Australia
    Posts
    106
    Quote Originally Posted by treebark View Post
    So great code and thanks, but this accomplishes what I originally was doing: assigned records evenly for each employee
    I need to be able to assign evenly by the entity, which each entity has a varying number of records associated:
    Entity 1 - 5 Records
    Entity 2 - 20 Records
    etc.

    I have to assign each employee the most even numbers of records but they have to have all the records assigned to them for the entities that are assigned to them. I have even been able to assign by entity and sort by descending count of the records per entity and that gets me pretty even, but because some entities have only 1 record I could get it even more evenly distributed, but that is the part I am unaware of how to do: being able to evenly distribute records based on entity
    Thank you
    You need to look at the code a tad more carefully ... it goes very close to doing precisely what you wanted (see sample processed data below) ... you need to grasp the concepts and do the rest yourself ... but here's a hint: you might need another table to store which ClientIDs go to which Employee (but only if you want each Client to be handled by a pafticular Employee) ... two fields Employee (Integer) and ClientID (integer) ... have you learned anything about normalising a database ... if not, please consider doing so.

    This is a problem apparently not properly understood from the get go being 'solved' using what I'll call the 'Chinese whisper' method ... I wonder what it will cost the client.




    ClientID TaskDescriptiom Employee
    1 Description 8 1
    1 Description 9 1
    1 Description 7 1
    1 Description 6 1
    1 Description 5 1
    1 Description 4 1
    1 Description 3 1
    1 Description 2 1
    1 Description 1 1
    2 Description 13 1
    2 Description 19 1
    2 Description 25 1
    2 Description 24 1
    2 Description 23 1
    2 Description 22 1
    2 Description 21 1
    2 Description 20 1
    2 Description 18 1
    2 Description 17 1
    2 Description 16 1
    2 Description 14 1
    2 Description 26 1
    2 Description 12 1
    2 Description 11 1
    2 Description 10 1
    2 Description 15 1
    3 Description 29 1
    3 Description 27 1
    3 Description 28 1

  2. #17
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,850
    An example of the process I suggested in post #14.

    In tblEntityRecs there are 11 Entities with their associated number of Records. I have sorted them descending NumberOfRecords.

    I am using 5 People, P1...P5 for the example. tblAssignment shows the Entity assigned to Each Person, and the number of records for that entity.

    The query DistributionOfRecords shows the total number of records for each person when distributed by the approach I suggested.

    The query WhichEntityAssignedToPerson shows the entities assigned to each Person.
    ex. P1 is assigned entity 1, 10 and 6.

    Click image for larger version. 

Name:	EntityRecords.jpg 
Views:	8 
Size:	114.5 KB 
ID:	30972


    Good luck with your project.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. One field dividing # in another filed.
    By PATRICKPBME in forum Access
    Replies: 2
    Last Post: 07-17-2017, 11:14 AM
  2. Replies: 2
    Last Post: 01-16-2015, 06:43 PM
  3. Replies: 1
    Last Post: 12-05-2013, 02:57 AM
  4. Evenly distributing fields
    By pledbetter in forum Forms
    Replies: 7
    Last Post: 01-08-2010, 02:38 PM
  5. Distribute table contents evenly
    By arfaha in forum Access
    Replies: 0
    Last Post: 11-14-2009, 02:32 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