I am trying to reset a list box...which works in a sense.
It deselects all the items but then, as part of the error checking I have
and it doesn't see this correctly because it isn't seeing -1. Eventhough nothing is selected, I get results back like 0 or 2 or etc...(from a msgbox listindex) so it bypasses that info and then gives me errors on the SQL string.
Any ideas what I can do?
Stoss
Code:
Dim varItem As Variant
With Me.lstPriorities
For Each varItem In .ItemsSelected
.Selected(varItem) = False
Next varItem
End With
It deselects all the items but then, as part of the error checking I have
Code:
If Me.lstPriorities.ListIndex = -1 Then
MsgBox "You have not selected any Priorities!"
Exit Sub
Else
Any ideas what I can do?
Stoss