Hi, I am trying to create a cmd button to remove the selected record from a lisbox. However the following code i use is only allow me to delete one record. Can someone here know hoe to fix it ?
Sub RemoveFromList(RemoveList As Access.ListBox)
Dim varlistItem As Variant
For Each varlistItem In RemoveList.ItemsSelected
RemoveList.RemoveItem (varlistItem)
Next varlistItem
End Sub
Sub RemoveFromList(RemoveList As Access.ListBox)
Dim varlistItem As Variant
For Each varlistItem In RemoveList.ItemsSelected
RemoveList.RemoveItem (varlistItem)
Next varlistItem
End Sub