divide records equally among multiple employees

M

Martin Leffler

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?
 
A

Allen Browne

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top