Solved Count number of selections in listbox

oxicottin

Learning by pecking away....
Local time
Today, 00:54
Joined
Jun 26, 2007
Messages
888
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:
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!
 
you can also not Hard code the ListCount:

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

Users who are viewing this thread

Back
Top Bottom