MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
Private Sub btnDelete_Click() On Error GoTo btnDelete_Click_Err On Error Resume Next DoCmd.GoToControl Screen.PreviousControl.Name Err.Clear If (Not Form.NewRecord) Then DoCmd.RunCommand acCmdDeleteRecord End If If (Form.NewRecord And Not Form.Dirty) Then Beep End If If (Form.NewRecord And Form.Dirty) Then DoCmd.RunCommand acCmdUndo End If ' If (MacroError <> 0) Then ' Beep Select Case MsgBox("You are about to delete this record., do you want to continue?", vbYesNo Or vbExclamation Or vbDefaultButton1, "Delete Record") Case vbYes Case vbNo End Select ' End If btnDelete_Click_Exit: Exit Sub btnDelete_Click_Err: MsgBox Error$ Resume btnDelete_Click_Exit End Sub