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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command Button to select multiple records in Drop down

Status
Not open for further replies.

okitamura

IS-IT--Management
Jul 24, 2004
8
0
0
US
Could someone tell me how to make a multiple selection by a single click on the Command button? I know it will be an event procedure on the CMD button but I do not know how to code this in VBA. The selection is always the same. Lets say that you see the following in the Dropdown(Combo Box): Apple, Orange, Banana, Water Melon, Milk. This list could increase over time to include other types of groceries.
But single click on this command button will always highlight Bannana and Water Melon and Milk. This is so that users would not have to do CTRL + Click when they know this sepcific combination will always remain constant.

Any code exmaple will be great! Thank you in advance.

Sam
 
I apologize it is a Combo Box that I am trying to do multi-select. You can do this manually. I wanted to achieve it by VBA. I should have clarified.
 
Again, only ListBox may have a MultiSelect property.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
There are a number of third-party controls that allow you to do this. Desaware is reputable vendor:
Here's a link to a Google Search:
( They cost money, and using them will make your project slightly harder to distribute and maintain.

You could also try subclassing the combo box in Visual Basic. However, I haven't built a custom control in several years, and my skills in this area are out of date and I don't have VB or .Net installed at this location, so I can't help. Maybe, someone else can jump int.

Good luck.

Alan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top