I use DoCmd.RunCommand acCmdDeleteRecord behind a Delete button on a form. I know I can get around any runtime errors with a resume next before the command if the delete does not go ahead but I don't like using resume next. So I have four questions.
1. If Cancel is set to True in the form's OnDelete event this generates error 3021 - No current records. Is this to be expected and can any other valid errors be expected if Cancel is set to True.
2. If user clicks No on BeforeDelConfirm this generates error 2501 - The RunCommand actoin was canceled. Is this to be expected and can any other valid errors be expected if user clicks No.
3. Are any other "normal " error codes to be expected?
4. Is there a better way to delete records?