Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi-Select ComboBox 1

Status
Not open for further replies.

bozic12

MIS
Joined
Jan 23, 2003
Messages
48
Location
US
Hi,
I'm assuming this is a fairly easy problem, but I'm having trouble figuring it out. My question is, on a form in Access, how do you make comboboxes multi-selectable. As of now, with the populated combobox, you can only make one selection. I am running reports based on this selection, so even if by holding down control, I would like to be able to make more than one selection. I'm assuming it's just a property somewhere, or if you can do it in VBA, that's fine too. Thanks for any help.

-Jeff
 
Hi bozic12,

As far as I know what you want isn't possible using a combo. Why not use a list box instead.

Bill
 
Bill,
I was afraid of that. The drop-down box feature fits my application well, that is why I would like to stay away from a list box if possible.

-Jeff
 
Hi Jeff - Bill is correct, the multselect is only in the list box. However, you can actually imitate the combo box functionality in the list box. All you need to do is work with the height property of the list box. Use the On Enter event and set lstBox1.height = X. You will have to play around with X to get it to the right size. Note X is in millimeters.

Then you will need to do the opposite for the On Exit event and set the listbox height to Y where Y is the start height of your listbox.

Finally, if you want the look and feel of a combo box, then add a command button and set the picture property to look like a down arrow. Then set the On Click event to set the focus into the listbox which will in turn trigger the On Enter event.

I hope this helps. Let me know if you have any questions.

Jay
 
Hi Jay,
Yeah, a variation of your solution is what I'm going to have to do. Thank you!

-Jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top