Private Sub cmddelete_Click()
Dim a As Integer
If renzheng() Then
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "暂时没有消费记录!"
Exit Sub
End If
a = MsgBox("删除后无法恢复!确认要删除该记录吗?", vbYesNo + vbInformation, "警告信息")
If a = vbYes Then
Adodc1.Recordset.Delete
Adodc1.Recordset.UpdateBatch
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "暂时没有消费记录!"
Exit Sub
End If
If Adodc1.Recordset.EOF Then
Adodc1.Recordset.MoveLast
Else
Adodc1.Recordset.MoveNext
If Adodc1.Recordset.EOF Then
Adodc1.Recordset.MoveLast
End If
End If
MsgBox "恭喜您!删除成功!"
End If
Else
MsgBox "身份认证失败,密码错误!"
End If
End Sub
缥缈止盈
互换的青春
相关分类