Private Sub cmddelete_Click()Dim a As IntegerIf renzheng() ThenIf Adodc1.Recordset.RecordCount = 0 ThenMsgBox "暂时没有消费记录!"Exit SubEnd Ifa = MsgBox("删除后无法恢复!确认要删除该记录吗?", vbYesNo + vbInformation, "警告信息")If a = vbYes ThenAdodc1.Recordset.DeleteAdodc1.Recordset.UpdateBatchIf Adodc1.Recordset.RecordCount = 0 ThenMsgBox "暂时没有消费记录!"Exit SubEnd IfIf Adodc1.Recordset.EOF ThenAdodc1.Recordset.MoveLastElseAdodc1.Recordset.MoveNextIf Adodc1.Recordset.EOF ThenAdodc1.Recordset.MoveLastEnd IfEnd IfMsgBox "恭喜您!删除成功!"End IfElseMsgBox "身份认证失败,密码错误!"End IfEnd Sub
添加回答
举报
0/150
提交
取消