Don't show alert messages

dcnick

Registered User.
Local time
Today, 06:01
Joined
Feb 26, 2002
Messages
38
Hello. I am performing update and delete queries and don't want the user to see the alert messages indicating fields are about to be changed / deleted. I've tried using the SetWarnings command, but the alerts still appear. Any ideas? My current code is below.

Thanks in advance
dcnick

DoCmd.SetWarnings False
CurrentDb.Execute ("qryUpdateTable")
Me.Requery
DoCmd.SetWarnings True
 
What version are you running?

Try adding a save in there as well.
 
At least in A2K, go to Tools...Options. Click on the Edit/Find tab and uncheck the box called Action Queries in the Confirm section. This will turn off ALL action query warnings so be sure that's what you really want to do!
 
Well, I think I figured out the problem. The problem turned out to be in other sections of my VBA code. I have

DoCmd.OpenQuery("queryname")

instead of CurrentDb.Execute("queryname").

When I use CurrentDb.Execute instead of DoCmd.OpenQuery, this makes the problem go away. You cannot use CurrentDb.Execute for all query types, though. I still must use DoCmd.OpenQuery for select and make table queries.

I don't know enough about Access to understand what the difference is...I just know this solved the problem.

dcnick
 

Users who are viewing this thread

Back
Top Bottom