I have a database that is being used by bill collectors to collect on accounts. At the end of each month, through the use of a combo-box, they designate for each account whether they would like to keep it or get a new one. They are only permitted to have 10 accounts at a time.
I currently run a simple query to return a count for each collector and then randomly assign the required number of accounts to each. Random assignment is done by assigning a random ID to each record and doing a Select Top (x)From RandID where x is the number of accounts they need.
Anyway, I want to automate this process (sort of like having a virtual poker dealer). I figure some sort of loop that would count their records, compare it with the required value, run an update query if it matched or start over with a +1 value if it didn't would work. My only problem is that I have never done anything like that and don't know where to start.
Any help is appreciated.
Zach
I currently run a simple query to return a count for each collector and then randomly assign the required number of accounts to each. Random assignment is done by assigning a random ID to each record and doing a Select Top (x)From RandID where x is the number of accounts they need.
Anyway, I want to automate this process (sort of like having a virtual poker dealer). I figure some sort of loop that would count their records, compare it with the required value, run an update query if it matched or start over with a +1 value if it didn't would work. My only problem is that I have never done anything like that and don't know where to start.
Any help is appreciated.
Zach