Re: Problem when undo delete data in Ms Access.
Posted by:
David Emme
Date: September 30, 2004 02:53PM
David Yew wrote:
> The problem comes when I select a record and press
> to delete the record.
> Naturally, you will see in the status bar that the
> total record is reduced by 1.
> And a message box to confirm if you want to
> proceed to delete the record.
> When I press or select No, the record is already
> deleted. You see #Delete# on the form.
I have the same configuration and the same problem. The best I've been able to do is work around the problem by handling the Delete myself. For example:
Private Sub Form_BeforeDelConfirm(Cancel As Integer, Response As Integer)
' Just do it
Cancel = False
Response = acDataErrContinue
End Sub
Private Sub Form_Delete(Cancel As Integer)
' If several records are selected, this runs once per record...
Dim Msg As String
' Prompt user about deletion.
Msg = "Permanently delete this record?"
Msg = Msg & vbCrLf & "(you will not be able to use Undo to get it back)"
If vbYes = MsgBox(Msg, vbQuestion + vbYesNo + vbDefaultButton2) Then
Cancel = False
Else
Cancel = True
End If
End Sub
Subject
Views
Written By
Posted
6506
September 08, 2004 04:56AM
2991
September 28, 2004 10:01AM
3368
September 28, 2004 02:03PM
Re: Problem when undo delete data in Ms Access.
3725
September 30, 2004 02:53PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.