HiAspire
10-31-2001, 02:42 PM
Forgive me if this has been asked and answered before, but I'm having trouble working with a multi-select list box.
I read that the value of a multi-select list box control will always be Null, but I'm wondering if there's some way of getting those selections into the database table.
Jack Cowley
10-31-2001, 05:21 PM
Search help for ItemsSelected and look at the examples. You will need to modify the code to save the selections to a table but the basic structure on how to find the selected items is there.
Pat Hartman
11-01-2001, 02:52 PM
You should NOT be saving multiple values to a single field. WHENEVER you have a 1-to-many relationship you should implement it properly with a separate table to hold the many-side data and a subform to manage it. I know it sometimes looks like over kill and a lot of extra work to create this structure properly, but believe me in the long run it is MUCH more trouble to do it improperly.
Greimalkin
11-04-2001, 07:24 PM
is it ever a good idea to use multiple selection? i was planning to use it on a clothes database where you can select more than one color.
maybe this isn't what's being discussed..
Jack Cowley
11-04-2001, 07:35 PM
If you want to select multiple colors from a single field in a query then a multiselect list box works fine for this. Code has been posted on this forum that will do this for you.
Pat Hartman
11-05-2001, 07:19 AM
The multi-select list box is most useful when prompting users for query selection criteria. So, if you wanted to query the table for anything that is blue or red, you could use a multi-select list box to supply 1 or more parameters. Your code would then trnaslate this into a where clause for a query.
If what you want to do is store the information that this garment is offered in red and green, you should NOT do this by storing "red, green" in the color field. You need to create a new table to hold this information properly and use a subform to manage it. The table would look something like:
GarmentID
Color
It would contain as many rows as there are colors in which the garment is made.