list box item selected?

F

Fredrated

Is there an easy way to tell if a list box has had an item selected?

Or is the only way to grab the selected items, then see if you got anything?

Thanks in advance for any help.

Fred
 
D

Douglas J. Steele

In the VBA module associated with the form, you can check
Me![NameOfListbox].ItemsSelected.Count It'll be 0 if nothing's selected.

From elsewhere, use Forms![NameofForm]![NameOfListbox].ItemsSelected.Count
 
F

Fredrated

Thanks, this is a big help!

Fred

Douglas J. Steele said:
In the VBA module associated with the form, you can check
Me![NameOfListbox].ItemsSelected.Count It'll be 0 if nothing's selected.

From elsewhere, use Forms![NameofForm]![NameOfListbox].ItemsSelected.Count

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Fredrated said:
Is there an easy way to tell if a list box has had an item selected?

Or is the only way to grab the selected items, then see if you got
anything?

Thanks in advance for any help.

Fred
 

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

Top