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 Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Clearing selected values in a list box 1

Status
Not open for further replies.

melaniews

Technical User
Oct 14, 2002
91
US
Hello,
I'm sure this must be simple but can't find FAQ on it. I have a form with a list box with multiselect property set to simple.

I want the user to be able to clear the box (deselect everthing and start over) but can't figure out the code for the on-click property to make it work.

TIA,

Melanie
 
Dim x As Variant

For Each x In List0.ItemsSelected
List0.Selected(x) = False
Next

ProDev, MS Access Applications
Visit me at ==> Contact me at ==>lonniejohnson@prodev.us

May God bless you beyond your imagination!!!
 
Dim varItem
For Each varItem In ListBoxName.ItemsSelected
ListBoxName.SELECTED(varItem) = False
Next varItem

PaulF
 
Thanks to both of you for the quick and accurate response.

Melanie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top