Action Query Notifications

After turning off confirmation for "Record Changes", Document Deletions" and "Action Queries" in the Edit Find tab under options, when running make-table, update and append queries you still get pop-ups to answer yes/no to. CAn these pop-ups go away as well? I want to run these types of queries without having to answer "Yes" i actually want to do this?
LVL 1
atreidiesAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Jim HornConnect With a Mentor Microsoft SQL Server Developer, Architect, and AuthorCommented:
DoCmd.SetWarnings False

'Your code gets executed here with no idiotic 'Do you want to delete records?' prompts

DoCmd.SetWarnings True
0
 
GordonPrinceCommented:
Or you can use an ADODB connection and .Execute the command. You won't see the warnings that way, either.
0
 
atreidiesAuthor Commented:
i added that to the OnActivate event for the form is there a way to set it to False for the entire application
0
 
GordonPrinceCommented:
Once you set
DoCmd.SetWarnings False
it stays that way until to set it back to true.

The potential problem with leaving it set to False is that errors you'd like to know about don't display either -- adds or updates that fail.

Dim con As New ADODB.Connection
With con
    .Open CurrentProject.Connection
    .Execute "delete from table1 where ID=6"  => no warnings here, but you will get messages if the statement fails
    .Close
End With
Set con = Nothing
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.