Listbox selected count

L

livin''''life

I have a form with a multiselect listbox.

I also have a textbox that gives me a count of the items on the list using:
Controlsource.....=lstbox.listcount

I would like a textbox next to that one that gives me a count of the items
selected updated as i select items. Is this possible? If so please help. I
just can't seem to figure it out. Thank you in advance.
 
S

sweet_dreams

Is this possible?  
Ofcourse it is possible. Just enter in Click event of Your list box
following code:

Me.txtCountSelected = Me.MyListBox.ItemsSelected.Count

Hope this helps.

Regards,
Sebastian
 
D

Dirk Goldgar

livin''''life said:
I have a form with a multiselect listbox.

I also have a textbox that gives me a count of the items on the list
using:
Controlsource.....=lstbox.listcount

I would like a textbox next to that one that gives me a count of the items
selected updated as i select items. Is this possible? If so please help.
I
just can't seem to figure it out. Thank you in advance.


I would expect a text box with a controlsource along these lines:

=lstbox.ItemsSelected.Count

.... would work, without any need for code. It seems to, in a quick test I
made using Access 2003.
 

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