G
Guest
I have several multi-select list boxes on a form. Some of them have more
items than I have room to display on the form, but the scroll bar allows the
user to see all the list items.
I also have a button for the user to click to clear all the selections:
Sub cmdClear_Click()
Me.lstElement = ""
Me.lstState = ""
End Sub
This code works great unless the user scrolls the list box so that the item
selected is no longer visible. It is the strangest thing. If I can visually
"see" the item selected and click cmdClear, the item is no longer selected
(which is what I want). If I scroll down, leaving the item selected, and
click cmdClear, the items is still selected--which I don't want. This same
scenario hold true when more than one item is selected.
I need help with how to clear what was previously selected in the list box!
Thank you,
Judy
items than I have room to display on the form, but the scroll bar allows the
user to see all the list items.
I also have a button for the user to click to clear all the selections:
Sub cmdClear_Click()
Me.lstElement = ""
Me.lstState = ""
End Sub
This code works great unless the user scrolls the list box so that the item
selected is no longer visible. It is the strangest thing. If I can visually
"see" the item selected and click cmdClear, the item is no longer selected
(which is what I want). If I scroll down, leaving the item selected, and
click cmdClear, the items is still selected--which I don't want. This same
scenario hold true when more than one item is selected.
I need help with how to clear what was previously selected in the list box!
Thank you,
Judy