It sounds like you have a bit of a squicky here. If I read the question correctly, you have five possible colors, and the value for the field, if it is NOT null, can be from one to five of those colors, and can be multiples, e.g. "RED", "RED BLUE", "GREEN", "GREEN YELLOW" etc etc..or even "RED BLUE GREEN WHITE YELLOW" It's really an array that you're working with, and they can be a bit sticky.
There are two ways of doing this, neither of which are very pretty. You could make this "color set" guy a single-field child record of the item in question, as a "many" side of a one to many relationship, where there could be NONE or up to five child records, each with a color:
Code:
Main Guy
Key1, FieldA, FieldB, FieldC
|
|
Color Segment:
Key1, Color
Key1, Color2
... etc
The other way, is to CONTROL data input, such that your color is picked from a list box or a set of option buttons, and the 'text' of your choice is concatenated upon further selections:
Code:
ColorField = ListBoxSelection1
...{another selection made}
ColorField = Color Field & " " & ListBoxSelection2
You could probably handle this whereby the list box gets recalculated after a selection to remove the color just selected, so you can't accidentally do a "RED RED". I'd probably also do something to institute a "clear field" where you can set the value back to NULL if you want.
Post back if further clarification needed.
Remember, you're unique - just like everyone else
You're invited to visit another free Access forum:
or my site,