Where do I add query on closing form?

M

malycom

Hi

I have a form that needs all info entered. If the user decides to force
close the form none of the info is saved. However, a message appears which
is an Access default message that states that the record can't be save at
this time.

I am happy with that message but as this appears, I have a query that I need
to run that will delete the record from the previous form.

The query works fine but I don't know where to place it or how to activate
it at the correct moment. I don't want to use a button to activate it.

Recap: Where do I put the query so that when the access default message
"Your record can't be saved at this time" activates, the query automatically
runs.

Thanks in advance

Malcolm
 
B

BruceM

What do you mean "delete the record from the previous form"? If you can't
save the record then the record isn't saved. What other record do you want
to delete?
 
M

malycom

Hi

Thanks for the response and sorry if I didn't make myself clear. Sometimes
its harder to explain the problem than to solve it. As it happens, I have
since worked out the solution.

Regards
 
Top