No of items selected in list box

  • Thread starter Thread starter Andrew
  • Start date Start date
A

Andrew

Hi,

Please consider the following extract of code.

For Each vItm In Me!lb_FY.ItemsSelected
x = Count(Me!lb_FY.ItemsSelected)
stWhat = stWhat & Me!lb_FY.ItemData(vItm)
stWhat = stWhat & stCriteria
Next vItm

In line 2 I'm trying to count how many items are selected. What is the
correct statement as this doesn't work?

Andrew
280308
 
Andrew said:
Hi,

Please consider the following extract of code.

For Each vItm In Me!lb_FY.ItemsSelected
x = Count(Me!lb_FY.ItemsSelected)
stWhat = stWhat & Me!lb_FY.ItemData(vItm)
stWhat = stWhat & stCriteria
Next vItm

In line 2 I'm trying to count how many items are selected. What is
the correct statement as this doesn't work?

Andrew
280308

I believe...

Me!lb_FY.ItemsSelected.Count
 
Back
Top