我有这段代码
rs = New ADODB.Recordset
Dim I As Integer
Dim a = MsgBox("Unstuck?", MsgBoxStyle.YesNo, "Confirmation")
If a = vbYes Then
For I = 0 To ListViewAccounts.CheckedItems.Count Step -1
rs.Open("Select * From tb_registration WHERE st_acc_number='" & ListViewAccounts.SelectedItems(I).SubItems(I).Text & "'", cn, 0, 3)
rs.Fields("st_log").Value = "out"
rs.Update()
rs.Close()
MsgBox("Accounts unstucked", MsgBoxStyle.Information, "")
ListViewAccounts.Items.Clear()
Call AccountList()
Next
Exit Sub
End If
这删除了列表视图中的选定行,现在我要做的是在每行中都有一个复选框,并根据我检查的检查行数删除多行,单击一次按钮。我怎样才能做到这一点?