Delete Query (1 Viewer)

wh00t

Registered User.
Local time
Today, 02:14
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?
 
D

D B Lawson

Guest
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!
 

wh00t

Registered User.
Local time
Today, 02:14
Joined
May 18, 2001
Messages
264
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
 
D

D B Lawson

Guest
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).]
 

adz2013

Registered User.
Local time
Today, 02:14
Joined
Dec 13, 2001
Messages
64
You want Docmd.SetWarrnings False at above and Docmd.SetWarrnings True below.
 

Users who are viewing this thread

Top Bottom