Specifying number of options selectable in Multi Select List Box
Posted on 2006-06-22
Just wondering if there is a method for specifying an exact number of options able to be selected in a multi select list box? For example: I have 2 list boxes on my form, lstAvailGenre and lstSelGenre. Between these list boxes I have two command buttons, cmdAddGenre and cmdRemGenre that add or remove items from/to lstSelGenre. If I have 20 options in the lstAvailGenre list box, I would like to limit users to a maximum of 3 selections. Not sure whether this would be better achieved by phyically limiting the number of items selectable in lstAvailGenre (maybe by dimming out other options until one or more of the selected options have been de-selected) or by limiting the number of items that can be added to lstSelGenre. Any suggestions?