如何在MSFlexGrid中批量删除
如何在MSFlexGrid中批量删除~?!
我的代码如下,如何改?!
Dim mrc As ADODB.Recordset
Dim MsgText As String
Dim intcount As Integer
If Trim(Me.MSF1.TextMatrix(MSF1.Row, 1)) = "" Then
sssss = MsgBox("你还没有选择记录!", vbOKOnly + vbExclamation, "警告")
Exit Sub
End If
If MsgBox("确定要删除工序编号为 " & Trim(Me.MSF1.TextMatrix(MSF1.Row, 1)) & " 的记录吗?" & Chr(13) & Chr(10) & "继续会导致该工序记录的数据丢失,继续吗?", vbOKCancel + vbExclamation, "警告") = vbOK Then
txtSQL = "select * from gx where 工序编号='" & Trim(Me.MSF1.TextMatrix(MSF1.Row, 1)) & "'"
Set mrc8 = ExecuteSQL(txtSQL)
mrc8.Delete
Unload Me
End If