This is really really close to what I need - however - right now it stops after a first pass through the preferences, and it doesn't skip an order preference if one has already been assigned a higher order....
If I kept it as is - then i just need to add so logic - that if recounter2 is not 0 then re-query the pref? (rst1) (if we have many TASKID's of the same type -say I have 20 task type 4's but this only gives each person who can do a type 4 - 1 job - and then it stops even though there are more type 4 jobs not assigned. (I guess i could just run the assign work again but it would be nice it assigned them all out at once) Is this what the copy of the preference table was for?

What if instead, I wanted to put the preference order in a temp table - say starting with everyones' order 1 - then it steps through each one - if it doesn't find a task ID/type for that employee's preference 1 then it would add that employee's preference 2 to the end of the table - so once it got through all the preference 1's it would start on the preference 2's that were added and if there was not a preference two - it would add a preference 3 ect, until there were no more preferences left and then it would go back to the beginning with preference 1. I would think it would be OK to still keep the logic to add another preference 2 to the end as we would either get all the jobs out before it reached that - or we would need that anyway.

Do you think that would work? There would need to be logic to move to the next order and to maybe skip adding if we reach the end of the preferences since not everyone has the same amount of preferences... In my mind this would work - but I might have the logic wrong... What do you think?