Is there any way to call a function from the Before Delete Confirm and After Delete Confirm events of a form using the standard arguments, for example,
BeforeDelConfirm: =SuppressDelConfirm(Cancel, Response)
or can you only use event procedures with these events?
The is the function (in a standard module) mentioned above:
Function SuppressDelConfirm(Cancel As Integer, Response As Integer)
Dim frm As Form
Set frm = Screen.ActiveForm
Response = acDataErrContinue
' Display custom dialog box.
If MsgBox("Delete this record?", vbOKCancel) = vbCancel Then
Cancel = True
End If
End Function
BeforeDelConfirm: =SuppressDelConfirm(Cancel, Response)
or can you only use event procedures with these events?
The is the function (in a standard module) mentioned above:
Function SuppressDelConfirm(Cancel As Integer, Response As Integer)
Dim frm As Form
Set frm = Screen.ActiveForm
Response = acDataErrContinue
' Display custom dialog box.
If MsgBox("Delete this record?", vbOKCancel) = vbCancel Then
Cancel = True
End If
End Function