B
Bill H.
Have this code fragment.
When I click on the delete command button when on a new record, instead of
the error being handled by Err-DelRec_Click, I just get the access error
window referencing error code 2046.
How do I get it to go to MY handler?
Thx.
Private Sub DelRec_Click()
On Error GoTo Err_DelRec_Click
DoCmd.RunCommand acCmdDeleteRecord
Exit_DelRec_Click:
Exit Sub
Err_DelRec_Click:
Select Case Err.Number
Case 3200
Beep
Case 2046 'tried to delete on new record
Resume next
Exit Sub
End Select
msgbox Err.Description
Resume Exit_DelRec_Click
End Sub
When I click on the delete command button when on a new record, instead of
the error being handled by Err-DelRec_Click, I just get the access error
window referencing error code 2046.
How do I get it to go to MY handler?
Thx.
Private Sub DelRec_Click()
On Error GoTo Err_DelRec_Click
DoCmd.RunCommand acCmdDeleteRecord
Exit_DelRec_Click:
Exit Sub
Err_DelRec_Click:
Select Case Err.Number
Case 3200
Beep
Case 2046 'tried to delete on new record
Resume next
Exit Sub
End Select
msgbox Err.Description
Resume Exit_DelRec_Click
End Sub