Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21273

VB6 Help: Delete Multiple Items

$
0
0
Hi good day mates =)
I'm new here, sorry if this post is wrong.

Problem: As the title said, I need help with; Listview multiple selected items and delete them.

Code of Delete botton Code:
  1. Private Sub deleteid_Click()
  2. Private Sub deleteid_Click()
  3. On Error GoTo deleterror
  4. If txtlinkitem.Text = vbNullString Then
  5. MsgBox "Have you selected I.D. from Catalog?", vbExclamation, "Delete an I.D."
  6. Exit Sub:
  7. End If
  8. If (MsgBox("Are you sure you want to delete this ID Number " & txtlinkitem & " ?", vbYesNo + vbQuestion, "Confirmation") = vbYes) Then
  9. executeQuery "DELETE FROM tableEmployee WHERE IDNumber = '" & txtlinkitem & "';"
  10. MsgBox "ID has been deleted.", vbInformation, "Delete Success"
  11. txtlinkitem.Text = vbNullString
  12. Call refreshList
  13. Else
  14. Call refreshList
  15. End If
  16. Exit Sub:
  17. deleterror:
  18. MsgBox Err.Description, vbCritical, "Error"
  19. Set con = Nothing
  20. Set rs = Nothing
  21. End
  22. End Sub

Please help me to add code to enable multiple selected items and delete them.
Thank you in advance =)

Viewing all articles
Browse latest Browse all 21273

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>