Hi,
Well, now the item is deleted from the ListView, but it won't be deleted from the Table.
VB Code:
RSLevels.Open "Select ID From Levels Where ID=" & Val(ListView1.SelectedItem.Key), Conn, adOpenDynamic, adLockOptimistic, adCmdText With RSLevels If Not (.BOF = True Or .EOF = True) Then .Delete If Not (.BOF = True Or .EOF = True) Then .MoveNext If .EOF Then RS.MoveLast .Update .Requery .Close End If End If End With If ListView1.SelectedItem.Index <> 1 Then ListView1.ListItems.Remove ListView1.SelectedItem.Index MsgBox " Item Deleted", vbExclamation, "Delete Item" End If
Any Help ????????
Thanks,
Habibalby




Reply With Quote