Solved Count number of selections in listbox (1 Viewer)

oxicottin

Learning by pecking away....
Local time
Yesterday, 21:08
Joined
Jun 26, 2007
Messages
856
Hello, I have a multiselect listbox (lstEmployeeNames) that I can only have a max amount of 10 selections. I want to be able to show the number of selections already chosen from the listbox in a label named (lblNumSelected). Is this possible and how can I do it?

I tried in a textbox control source =[lstEmployeeNames].[ListCount] but that just shows me a count of the total in the list and I need to know how many is selected not the count of it all.

Thanks,
 
Last edited:

oxicottin

Learning by pecking away....
Local time
Yesterday, 21:08
Joined
Jun 26, 2007
Messages
856
Thanks MajP, I put in the textbox source

=[lstEmployeeNames].[ItemsSelected].[Count] & " Out of 10"

An in the forms Current I put Me.txtNumOfSelected.Requery

All works great thanks!
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 09:08
Joined
May 7, 2009
Messages
19,231
you can also not Hard code the ListCount:

=[lstEmployeeNames].[ItemsSelected].[Count] & " Out of " & [lstEmployeeNames].ListCount
 

Users who are viewing this thread

Top Bottom