divide records equally among multiple employees

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

example: I have 1000 sorted records. I have 5 employees. I want 1st record to
go to emp 1; 2nd record to emp 2 ... 5th record to 5th emp. Then I want to
start new assignment of records: emp 2 gets 1st rec; emp 3 gets 2nd rec....
emp 1 gets 5th record, thus rotating which emp gets first record. Is this as
difficult as it appears?
 
Write code to follow this logic:

OpenRecordset() on the source query
OpenRecordset() on the target table (where assignments are appended.)
OpenRecordset() on the available employees
Loop through the source until EOF
Next employee (resetting back to the first when you get to the last)
AddNew to the target table (remembering to Update)
Next source record
Close records and clean up.
 
Back
Top