How to suppress the Delete Confirm dialog box when using SQL statement to delete record
Posted on 2004-08-20
I'm using an SQL delete statement to delete a contact from a table. I used the following code to suppress the dialog box but it's not working:
Private Sub Form_BeforeDelConfirm(Cancel As Integer, _
Response As Integer)
' Suppress default Delete Confirm dialog box.
Response = acDataErrContinue ' Display custom dialog box.
If MsgBox("Delete this record?", vbOKCancel) = vbCancel Then
Cancel = True
This is just the code from Visual Basic Help. What could be wrong? Thanks.