I am trying to create a button to delete record, I have used the wizard and it works fine but now I want to have a confiirmation message to confirm that they really want to delete this record.
below is my code. The prompt works but the record never deletes.
Any Idea's
Private Sub cmdDeleteRec_Click()
On Error GoTo Err_cmdDeleteRec_Click
DoCmd.SetWarnings False
If MsgBox("Are you sure you want to delete this record?", vbYesNo, "Warning.........") = vbYes Then
Me!frm_Entry.SetFocus
DoCmd.RunCommand acCmdDeleteRecord
DoCmd.SetWarnings True
Else
DoCmd.SetWarnings True
End If
Exit_cmdDeleteRec_Click:
Exit Sub
Err_cmdDeleteRec_Click:
MsgBoxErr.Description , vbExclamation, "Error #" & Err.Number
Resume Exit_cmdDeleteRec_Click
End Sub

below is my code. The prompt works but the record never deletes.
Any Idea's
Private Sub cmdDeleteRec_Click()
On Error GoTo Err_cmdDeleteRec_Click
DoCmd.SetWarnings False
If MsgBox("Are you sure you want to delete this record?", vbYesNo, "Warning.........") = vbYes Then
Me!frm_Entry.SetFocus
DoCmd.RunCommand acCmdDeleteRecord
DoCmd.SetWarnings True
Else
DoCmd.SetWarnings True
End If
Exit_cmdDeleteRec_Click:
Exit Sub
Err_cmdDeleteRec_Click:
MsgBoxErr.Description , vbExclamation, "Error #" & Err.Number
Resume Exit_cmdDeleteRec_Click
End Sub