How get rid of Delete confirmation msgbox?

G

Guest

I have a continuous form. When the user deletes a row it fires the ON DELETE
event and I want to put out my own message. I delete the record in code after
performing some validations. I do not want to get the generic MS Access
delete confirmation. How do I get rid of it? Right now if the user responds
NO, I have already deleted some related records so its a mess.
 
J

Jeff Boyce

Here's one way to do this ... but you could end up in a real mess if you
aren't careful!

If you turn off the warnings (DoCmd.SetWarnings False), you won't be
notified of the impending delete.

And if you fail to turn the warnings back on afterwards (or if the code
blows up and dumps you back into the application WITHOUT turning the
warnings back on), you will never know what Access is doing...

This is a "tablesaw"-rated technique -- you can use it, it can do some good,
and you can cut your hand off if you aren't careful.

You've been warned!

Good luck

Jeff Boyce
Microsoft Office/Access MVP
 
P

Powderfinger

mscertified said:
I have a continuous form. When the user deletes a row it fires the ON DELETE
event and I want to put out my own message. I delete the record in code after
performing some validations. I do not want to get the generic MS Access
delete confirmation. How do I get rid of it? Right now if the user responds
NO, I have already deleted some related records so its a mess.

Select Tools/Options and click the Edit/Find tab. Uncheck "Confirm Document
Deletions"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top