• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 331
  • Last Modified:

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?
0
atreidies
Asked:
atreidies
  • 2
1 Solution
 
Jim HornMicrosoft 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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now