Private Sub cmdDelete_Click() '删除按钮功能代码 On Error Resume Next'***************************************删除记录控制********************************** Dim response As Integer response = MsgBox("你真想删除一条记录吗??", vbYesNo, "警告") If response = vbNo Then Exit Sub With rsOutput .Delete .MovePrevious If .EOF Then .MoveLast If .BOF Then .MoveFirst End With display
End Sub
if msgbox("确认要删除吗?",vbyesno+vbinformation)=vbyes then '删除代码 else exit sub end if
On Error Resume Next'***************************************删除记录控制**********************************
Dim response As Integer
response = MsgBox("你真想删除一条记录吗??", vbYesNo, "警告")
If response = vbNo Then Exit Sub
With rsOutput
.Delete
.MovePrevious
If .EOF Then .MoveLast
If .BOF Then .MoveFirst
End With
display
End Sub
'删除代码
else
exit sub
end if