Listbox selected count

  • Thread starter Thread starter livin''''life
  • Start date Start date
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.
 
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
 
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.
 
Back
Top