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
 

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

Back
Top