Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

De-Select Items in Listbox???

Status
Not open for further replies.

jasonp45

Programmer
Aug 23, 2001
212
US
Seems like this should be simple, but I can't get it to work. I have a multi-select listbox (in Access 2000), and, after a commandbutton is pressed I want all selected values to be de-selected. How???

Here is some of my code:

With lstMyListbox
For a = 0 To .ItemsSelected.Count - 1
.[SomeProperty?] (.ItemsSelected(a)) = False?
Next a
End With

 
Try this:
With lstMyListbox
For a = 0 To .ItemsSelected.Count - 1
.Selected(a) = False
Next a
End With

Let me know how this works,

John
 
Hi!

Try .Selected(a) = False.

hth
Jeff Bridgham
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top