Clear list box selection

  • Thread starter Thread starter Opal
  • Start date Start date
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"
 
It depends on whether you've got MultiSelect enabled (and what type of
MultiSelect if you do), but try

LstTM = Null
 
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.
 
Back
Top