Delete Query Message.

Mark121

Registered User.
Local time
Today, 14:40
Joined
Oct 23, 2006
Messages
23
Sorry if there is already a post on this(I cant seem to find it).

Is it possible to remove the confirmation message when running a delete query? i know you can remove all the other query confirmations through tools>options etc but i cant seem to get rid of this one.

Thanks

Mark
 
in (edit)your run query button put this in:
DoCmd.SetWarnings(0)
before opening the query
 
Fantastic, thanks for your help.

Mark
 
I'd strongly advise you to switch them back on afterwards too. DoCmd.SetWarnings True

Whilst they can be annoying, messages are useful. If they are switched off using the code here and not switched on, there's a possibility you'll do something you didn't mean to do, and not be asked to confirm without ever knowing about (until you try to query those 50,000 records you just deleted...)
 
that's a good point, but i guess that's what the message is there for anyway?

hah.

also, even if they are switched off here if there's something wrong with the delete you could easily needed recoreds without noticing!

i guess. be careful, regardless.
 
Ecron said:
in (edit)your run query button put this in:
DoCmd.SetWarnings(0)
before opening the query
I am very novice with visual basic. Where do I put this code? or is there a way to put this step into a macro?
 
You dont need to put it in the VB you can put it in a macro.
If you create a macro theres a function called runCode select this and in the input box at the bottom put the code in.

Hope this helps
 

Users who are viewing this thread

Back
Top Bottom