You know your domain better than we do, so the following is only a SWAG ...
If I had 20 potential items, I'd probably put THEM in a table (tall/narrow,
not 20-items-wide). That way I could add/subtract items without having to
do a total remodel of the database.
Then, if I needed some combination of items (say, #7 & #9), I could create a
table that held a single field. In that field I could add a new record
containing "0709" (I'd use zero-fill for the single digit items). Then I
could create a procedure that looks at that [ValidValue] table, divides it
into 2-character groups, and checks the main table (I still don't know where
you have the 'scores' that include the 20) to find records that contain the
first and the second.
The advantage of this approach would be that if you ever decide to use FOUR
of the items, you could add a string like "03171819" to identify a new valid
set (even though this one has four items).
But it will take some coding to pull off.
Don't create a table with 20 yes/no fields and "check" off the valid
combinations -- that's going to cause you some serious pain and remodeling
if the number of items ever changes.
Good luck!
Regards
Jeff Boyce
Microsoft Access MVP
--
Disclaimer: This author may have received products and services mentioned
in this post. Mention and/or description of a product or service herein
does not constitute endorsement thereof.
Any code or pseudocode included in this post is offered "as is", with no
guarantee as to suitability.
You can thank the FTC of the USA for making this disclaimer
possible/necessary.
mls via AccessMonster.com said:
Can you give an example of using a table?
Jeff said:
I re-checked. The numbers just get bigger and bigger, the more you
"take-at-a-time". You really need to spec' out which ones, so I'm
thinking
you are much better off using a table to do that.
Regards
Jeff
You might want to revisit the math in your combinatorics.
[quoted text clipped - 45 lines]