Change Multiselect List box from multi to single select

G

Guest

Hi there,

Using VBA, i am trying to change a list box from a multi-select list box to
a single select list box, but I am not having much luck. I tried this line,
but it throws an error, any ideas on how i can do this?

me.lstAccreditation.Multiselect = 2

Essentially i want to reuse a form to run different reports and i need to,
in one instance allow the user to select multiple criteria, where in others
only select one value.
 
D

Duane Hookom

The multiselect property can only be set in design view of the form. I wrote
code once the unselected all but the last item of a multi-select list box.
You might need to do the same or possibly use two list boxes and make one
visible at a time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top