PDA

View Full Version : Multiple Choice Combo Box


mcleyn
May 27, 2009, 10:45 AM
I have a combo box with three choices; Innovation, Competitive and Amenities.
The Control Source field for these choices is called; Initiatives.
I want the user to be able to choose 1, 2 or even 3 of these options on my form.
I have made a mulit select listbox but they are not showing up in the fields.
Is there any other options I have to make mulitple choices? Or am I doing something wrong with the Multi Select Listbox?

ScottGem
May 27, 2009, 10:53 AM
Probably both. If a field can hold multiple values then it shouldn't be a field. What you should have is a subtable. Something like this:

tblInitiative
ParentID (FK)
Initiative

The ParentID would be the PK value from the parent record and you would use a composite PK of the two fields to insure no duplication. You can use either a subform to enter records for each or you can use a Multi-select listbox.

However a multi-select listbox needs to be processed. When the multi-select property is set to Yes, the controlsource is not used. Access Help has a code sample (when you look up Multi-Select) that shows how to process the selections. You would need to modify that code to append a record to the above table for each selection.