I'm not even sure how to describe this, so please bear with me. I'm an experienced VBA developer, but I have a unique challenge. I am developing outbound call sheets for between one and four associates, but there are complicated duplicate rules involved.
Each call line calls one business about one of their clients. There can be multiple call lines per client, and multiple call lines per business. Also, one client may (and likely will) have visited more than one business in the pool of available call lines, and one business may have served multiple clients. Basically, I have a nasty multiplicity issue.
At the end of the day, I have to ensure that I have between 1 and four call sheets where:
Businesses are grouped on one sheet (ie one business can't span multiple call sheets)
Clients are grouped on one sheet (ie one client can't span multiple call sheets)
There are an even number of businesses spread on each call sheet
I can do half of this easily by looping through a sorted list of the businesses and assigned them to one of the n number of callsheets (total businesses mod n), but once I have that, there is a good chance that clients are going to be spanning two or more call sheets.
This strikes me as an opportunity for a recursive algorithm, but I can't figure out where to start. Does anyone know an easier solution for this? Or a harder solution, so long as it works? Any tips would help.
If it helps:
Windows 7 32 bit
Access 2010 32 bit