Dialog boxes

Boomshank

Registered User.
Local time
Today, 20:53
Joined
Feb 20, 2009
Messages
29
I am running delete and append queries but when i run them i'm asked to click yes, no or cancel, is there anyway i can bypass this and have automatically select yes?

The code i am using is

Dim stDocName As String
stDocName = "AppendDups"
DoCmd.OpenQuery stDocName, acNormal, acEdit

Any help will be much appreciated
 
Code:
Dim stDocName As String
stDocName = "AppendDups"
[B]DoCmd.SetWarnings False[/B]
DoCmd.OpenQuery stDocName, acNormal, acEdit
[B]DoCmd.SetWarnings True[/B]
 
But if you do use DoCmd.SetWarnings, be sure to include an ERROR HANDLER on that procedure and then as the first line of the error handler make sure to set

DoCmd.SetWarnings True

so that if something fails in between, you don't find yourself without warnings.
 

Users who are viewing this thread

Back
Top Bottom