I have this routine for custum dialog box that works fine ONLY when I "remarked" everything after the Response = acDataErrContinue in the if statement.
I am just trying to have a "Record Deleted" dialog and close the form and open my search form.
If I enable the 3 lines (or just the 2 close/open lines) the record doesn't deleted.
I am just trying to have a "Record Deleted" dialog and close the form and open my search form.
If I enable the 3 lines (or just the 2 close/open lines) the record doesn't deleted.
Code:
Private Sub Form_BeforeDelConfirm(Cancel As Integer, _
Response As Integer)
Dim strMessage As String
Dim intResponse As Integer
On Error Resume Next
' Display the custom dialog box.
strMessage = "blah-blah" & vbNewLine & _
"blah-blah" & vbNewLine & vbNewLine & _
"blah-blah"
intResponse = MsgBox(strMessage, vbYesNo + _
vbQuestion, _
"blah-blah")
' Check the response.
If intResponse = vbYes Then
Response = acDataErrContinue
'MsgBox "Record Deleted", , "blah-blah"
'DoCmd.Close
'DoCmd.OpenForm "Search form"
Else
Cancel = True
End If
End Sub