Delete Query

wh00t

Registered User.
Local time
Today, 04:36
Joined
May 18, 2001
Messages
264
Greetings

I have a delete query which works fine, but I would like to get rid of the two messages that come up when it's run, 1st message, you are about to delete blah blah blah, 2nd message changes not retrievable blah blah blah. Any ideas?
 
Are you activating the delete query through code or a macro?

Either way you can switch off the warnings.

In code

DoCmd.setwarnings false

Your delete query code

DoCmd.setwarnings true

It's important that you activate the warning again at the end of the code.

You can do the same in the Macro but I can't remember how!
 
thanks for the reply but could you clarify how to do this?

DoCmd.setwarnings false

Your delete query code - do I enter the SQL code here? or put DoCmd.OpenQuery?

DoCmd.setwarnings true
 
Hi

"Your code here" would be whatever you have now that triggers the query. You just need to put the DoCmd.SetWarnings just above and just below whatever you have in place just now.

Thanks

Dawn

[This message has been edited by D B Lawson (edited 02-14-2002).]
 
You want Docmd.SetWarrnings False at above and Docmd.SetWarrnings True below.
 

Users who are viewing this thread

Back
Top Bottom