Multi select combo box in access

I have a trainer profile form.In that form I used a multi select combo box. I want to see selected  items from the combo box in bottom text box (each item in one row).If I select 5 items in combo box, I would like to see those items in bottom text box.When I add new record or edit record.
Sreeni KambalaAsked:
Who is Participating?
 
Dale FyeCommented:
Sreeni,

I don't use multi-Select fields because they are extremely difficult to query and create reports for.  Instead, I would recommend that you create an additional table where you can store the values you have selected which relate to your main record.  I do this several ways, but the easiest is to create a subform, linked to your main form on the primary key in the main record.  Then, in your secondary table, you would have fields like:

ID - Autonumber
PKID - Long  (this would be the field that links your subform to your main form)
comboID - Long (this would be the ID value of the item selected in your "multi-select"

In the subform, you would hide the ID, and PKID fields and create a combo box bound to the ComboID field.  You would set the RowSource of the Combo box to something like:

SELECT ComboID, Description
FROM yourMultiListTable
ORDER BY [SomeField]

Then when you put this form on your main form, you would relate the two forms on the PKID field and whenever you go to a record it will display the values you have added to your subform.

HTH
Dale
0
 
Sreeni KambalaAuthor Commented:
ATTACHED SAMPLE DB.
sample.accdb
0
 
Helen FeddemaCommented:
I don't see a multi-select listbox on your form.  In Access, combo boxes only allow a single selection at a time.  You have a combo box bound to a multi-valued field (these fields are very problematic and difficult to work with, as Dale pointed out).  It would be best to redo the field as a linked table, the "many" side of a one-to-many relationship, but if that is not possible, these Access Archon articles on working with multi-valued fields might be of help.

accarch159.zip
accarch196.zip
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.