If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Deselect All in List Box
I have a multi-select List Box on my form. Is there a way for the user to
Deselect All if they make a mistake and click on an Item in the box? I just made the mistake myself in trial and while I can change the Item(s) selected, I'm not being able to deselect all. Thanks so much! Pamela |
#2
|
|||
|
|||
Deselect All in List Box
See this link;
http://allenbrowne.com/func-12.html Also, you may want to bookmark Allen Brown's website. There are a lot of useful tips, procedures, functions etc. -- _________ Sean Bailey "Pamela" wrote: I have a multi-select List Box on my form. Is there a way for the user to Deselect All if they make a mistake and click on an Item in the box? I just made the mistake myself in trial and while I can change the Item(s) selected, I'm not being able to deselect all. Thanks so much! Pamela |
#3
|
|||
|
|||
Deselect All in List Box
Here's one that clears a listbox on one of my forms:
Dim varItem As Variant For Each varItem In Me.lstElevation.ItemsSelected Me.lstElevation.Selected(varItem) = 0 Next varItem Me.lstElevation.Requery -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "Pamela" wrote in message ... I have a multi-select List Box on my form. Is there a way for the user to Deselect All if they make a mistake and click on an Item in the box? I just made the mistake myself in trial and while I can change the Item(s) selected, I'm not being able to deselect all. Thanks so much! Pamela |
#4
|
|||
|
|||
Deselect All in List Box
Thanks, Guys! I was getting ready to test it out when I found that if I
simply hold down Ctrl as I click even the last item in the box that it will, indeed, deselect all. When I tried it before, I was just single clicking. Thanks! "Arvin Meyer [MVP]" wrote: Here's one that clears a listbox on one of my forms: Dim varItem As Variant For Each varItem In Me.lstElevation.ItemsSelected Me.lstElevation.Selected(varItem) = 0 Next varItem Me.lstElevation.Requery -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "Pamela" wrote in message ... I have a multi-select List Box on my form. Is there a way for the user to Deselect All if they make a mistake and click on an Item in the box? I just made the mistake myself in trial and while I can change the Item(s) selected, I'm not being able to deselect all. Thanks so much! Pamela . |
Thread Tools | |
Display Modes | |
|
|