I don't think I explaing my set up clearly. Here is an example...I want to
track the preferences of Artsy People, so I have them select their favorite
colors from the choices I give them. I'm using a 0,1 system (0=No, 1=Yes). I
have 3 text boxes - for White, Black, and Red.
Then you are storing data - a color - in a fieldname. This is
*incorrect*.
If Betty likes White and Red -
she would put a 1 in the text box corresponding with White, a 1 in the text
box corresponding to Red, and a zero in the text box corresponding to Black.
[The advantage to this 0,1 method is that I can tell which of the colors
Betty does or does not like versus the colors she didn't indicate a
preference on (which would be done by leaving the text box blank).]
The normalized design would allow this perfectly well.
With this method, I have 3 boxes for each color on my form. This takes up
space, so I'd rather make a table called Color_Options and use that table to
populate a drop-down box named "Favorite Colors". Can Betty select White AND
Red from that drop-down box?
Yes... *IF* the combo box (to use its proper name) is in a Subform
bound to a new table.
If she can, how would that information be stored in the "Favorite Colors"
field? Would I be able to do a query listing all the people that like White
(even if they chose White and Red)?
Yes.
To reiterate: you would have three tables - People, Colors (all the
allowable colors), and FavoriteColors.
The FavoriteColors table would have three fields - PersonID (a link to
the primary key of People), Color, and Preference (an integer, 0 or
1).
Your Form would be based on People; on it you would have a continuous
Subform with a combo box based on Colors, and a textbox for the
Preference.
If Betty (PersonID 312) likes White and Red, and dislikes Black and
Purple, the FavoriteColors table might contain records
312 White 1
312 Black 0
312 Red 1
312 Purple 0
If she has no preference about green, there'd simply be no entry in
the table for green.
This design allows you to easily change or add colors, to very simply
search for all people who like red or dislike purple, etc.
John W. Vinson[MVP]