i have a listbox that uses the 'row source type' as a value list.
i have another listbox that uses a row source type as a table/query.
on my VALUE LIST listbox, i am able to delete items from the listbox using the following code
i tried using this same method for my listbox that displays details from a query.. (so that records can be deleted from the listbox in the same way)
but the database told me that this will only work if the listbox has a value list..
therefore my question is... can i implement the same 'removeitem' function on my listbox that uses a source from a table/query..
i have another listbox that uses a row source type as a table/query.
on my VALUE LIST listbox, i am able to delete items from the listbox using the following code
Code:
Private Sub lstDriverTime_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 46 And Me.lstDriverTime.ListIndex <> -1 Then
Me.lstDriverTime.RemoveItem (lstDriverTime.ListIndex)
End If
End Sub
i tried using this same method for my listbox that displays details from a query.. (so that records can be deleted from the listbox in the same way)
but the database told me that this will only work if the listbox has a value list..
therefore my question is... can i implement the same 'removeitem' function on my listbox that uses a source from a table/query..