Private Sub Command_3_Click()
Dim intYesNo
Frame_add.Visible = False
DataGrid1.AllowDelete = True
If DataGrid1.SelBooks.Count = 0 Then
MsgBox "请选择一条记录以供操作!", vbOKOnly + vbExclamation, "注意!"
Exit Sub ElseIf CZLX = 1 Then
Adodc1.RecordSource = "select *from tb_BasicInformation"
Adodc1.Refresh
intYesNo = MsgBox("确实要删除这条参数吗?", vbYesNo + vbExclamation, "注意!") If intYesNo = vbYes Then Dim varBmk As Variant
For Each varBmk In DataGrid1.SelBooks
Adodc1.Recordset.Book = varBmk
Adodc1.Recordset.Delete
Adodc1.Recordset.UpdateBatch
Next
End If
DataGrid1.Refresh
Adodc1.RecordSource = "select *from tb_BasicInformation"
Label_Num.Caption = Adodc1.Recordset.RecordCountvbdatagrid
Dim intYesNo
Frame_add.Visible = False
DataGrid1.AllowDelete = True
If DataGrid1.SelBooks.Count = 0 Then
MsgBox "请选择一条记录以供操作!", vbOKOnly + vbExclamation, "注意!"
Exit Sub ElseIf CZLX = 1 Then
Adodc1.RecordSource = "select *from tb_BasicInformation"
Adodc1.Refresh
intYesNo = MsgBox("确实要删除这条参数吗?", vbYesNo + vbExclamation, "注意!") If intYesNo = vbYes Then Dim varBmk As Variant
For Each varBmk In DataGrid1.SelBooks
Adodc1.Recordset.Book = varBmk
Adodc1.Recordset.Delete
Adodc1.Recordset.UpdateBatch
Next
End If
DataGrid1.Refresh
Adodc1.RecordSource = "select *from tb_BasicInformation"
Label_Num.Caption = Adodc1.Recordset.RecordCountvbdatagrid
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货