Delete Query

Zippyfrog

Registered User.
Local time
Today, 14:27
Joined
Jun 24, 2003
Messages
103
Quick question:

How can I automatically bypass the messages "You are about to run a delete query that will modify data in your table."? I don't want an end user to see that message, I just want the delete query to run. Is there a way to get rid of that message without supressing all the messages in the entire database?
 
The following Visual Basic syntax will execute action queries without the warning prompt:
Code:
CurrentDb.Execute "[i]<sql statement here>[/i]"
For example:
Code:
CurrentDb.Execute "DELETE * FROM MyTable;"
 
I believe this will work as well:

DoCmd.SetWarnings False

DoCmd.RunSQL "SQL Statement Here;"

DoCmd.SetWarnings True
 

Users who are viewing this thread

Back
Top Bottom