Clearing a List Box in Access

Sometimes you need to wipe the slate clean and start fresh. Here's a simple function to do just that for an Access list box.

Clearing a List Box in Access

Nothing fancy here.  Just a simple function to clear the selections from a ListBox.

Function ClearListBox(LBox As ListBox)
    Dim Item As Variant
    For Each Item In LBox.ItemsSelected
        LBox.Selected(Item) = False
    Next Item
End Function

Image by ARTEM DA PICTURES from Pixabay

All original code samples by Mike Wolfe are licensed under CC BY 4.0