I have an Access 2010 database. The user will open a list box of items and select as many as he/she wants, then hit next. A continuous form opens with the selected items. Each item has a text box named "percentage". The user must enter a percentage for each item so that the total percentage of all items equals 100.
That part is easy, but I thought it would be nice to give the user the option of hitting a command button that would enter a number for each item so that the total still equals 100. If the user is working with 4 items, no big deal. Each item would be 25%. But what if the user is working with say 7 items? Is there a formula that will fill these numbers so that each number is + or - one from the others, and there totals equal 100? Oh, and no decimals allowed.
For instance using 7 items:
14%
14%
14%
14%
14%
15%
15%
Equals 100%
That part is easy, but I thought it would be nice to give the user the option of hitting a command button that would enter a number for each item so that the total still equals 100. If the user is working with 4 items, no big deal. Each item would be 25%. But what if the user is working with say 7 items? Is there a formula that will fill these numbers so that each number is + or - one from the others, and there totals equal 100? Oh, and no decimals allowed.
For instance using 7 items:
14%
14%
14%
14%
14%
15%
15%
Equals 100%