B
bhammer
My form has a command button that runs:
Private Sub cmdClearList_Click()
Dim SQL As String
SQL = "DELETE tblCatalog_Temp.* " & _
"FROM tblCatalog_Temp;"
DoCmd.RunSQL SQL
End Sub
I don't want the user to have to answer the obligatory dialog, and I don't
want to globally turn it off via Tools/Options.
I have the following too, but of course it doesn't apply to records in the
other table.
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
End If
End Sub
Private Sub cmdClearList_Click()
Dim SQL As String
SQL = "DELETE tblCatalog_Temp.* " & _
"FROM tblCatalog_Temp;"
DoCmd.RunSQL SQL
End Sub
I don't want the user to have to answer the obligatory dialog, and I don't
want to globally turn it off via Tools/Options.
I have the following too, but of course it doesn't apply to records in the
other table.
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
End If
End Sub