Clear list box selection

O

Opal

In Access 2003, how can I clear
the selection from a list box in an
unbound form?

I tried:

LstTM.ListIndex = -1

but I get an error telling me:

'You've used the ListIndex property incorrectly"
 
D

Douglas J. Steele

It depends on whether you've got MultiSelect enabled (and what type of
MultiSelect if you do), but try

LstTM = Null
 
D

Douglas J. Steele

In that case, try:

LstTM.RowSource = LstTM.RowSource


LstTM = Null will work if MultiSelect is None or Extended.

LstTM.RowSource = LstTM.RowSource will work if MultiSelect is Simple or
Extended.
 

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