I have tried
1. me.lstSelCust.Requery
2. me.lstSelCust = Null
3. me.lstSelCust = " "
And others not worth mentioning.
The list box is populated from a table.
Can anyone provide any suggestions?
Thanks in advance
C.Y.
I actually just found the answer so I thought I would
share it in case anyone else had the same problem. You can
write a routine like the following to clear the selections
from a multi-select list box.
Sub ClearSelection()
Dim intCurrCat As Integer
For intCurrCat = 0 To me!lstSelCust.ListCount - 1
me!lstSelCust.Selected(intCurrCat) = False
Next intCurrCat
End Sub
C.Y.
Call the following subroutine in the click event of your command
button, or copy and paste the code if this is the only listbox you
have in your application.
Public Sub ClearListbox(ctrl as control)
Dim varItem as variant
For each varItem in ctrl.ItemsSelected
ctrl.Selected(varItem) = False
Next varItem
Exit sub
--
HTH
Dale Fye
"C.Y." <C...@nomail.please> wrote in message
news:004a01c34575$65b49710$a501...@phx.gbl...
You were one step ahead of me!
C.Y.
>.
>