Please post lengthy code within code tags (# on toolbar) and use indentation. You can always edit a post if you forget.
Not seeing a need for all that code. Why not just run a delete query that gets the values from your form? You might still need to validate conditions, but other than being on a new record, I can't discern what they might be. IF Me.NewRecord should be enough without opening a recordset, for which by the way, delete is not supported. At least, not any longer.
Last edited by Micron; 03-16-2019 at 04:24 PM.
Reason: clarification and correction
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.