Selecting more than one value

Andrew Ainsworth

New member
Local time
Today, 07:11
Joined
Feb 3, 2014
Messages
1
In Access 2013, I would like to be able to choose more than one value from a combo box, but I believe this is not possible. However, I can prepare a list box and set the Multi Select to Extended. Doing this, I can indeed select more than one value, but I don't know how to get those values into a text field in the form. (If poss, they would become comma separated in that field). Ideally, the code would call the list box because it would take up too much space if it were there all of the time.
 
you would need to use some vba along the following lines.

Code:
myTxtBox=""
For i=0 to myListBox.listcount-1
    if myListBox.Selected(i) then myTxtBox=myTxtBox & myListBox.Column(i) & ", "
next i
Note if you are displaying column headings, then row 0 is the heading so you need to use for i=1 to ....
 
Many thanks, CJ. I'll give that a try.
 

Users who are viewing this thread

Back
Top Bottom