Suppress Messages from Access?

  • Thread starter Thread starter Anthony
  • Start date Start date
A

Anthony

I have a module that performs various operations on my database. The module
works properly, but Access pops up a bunch of confirmation messages for
certain operations. There is no need for this since my code checks to
ensure that everything is ok before the operation is done. How can I
suppress messages from Access when doing these operations? Specifically, I
need to suppress messages from a Delete done with RunSQL(), and a make table
query. Thanks for your help.

- Anthony
 
Check out KB article #216888. You can use

Application.SetOption "Confirm Action Queries", False

Typically, you'd use GetOption before your query, and set
a variable to that value (suggested Variant type); then
use SetOption as above, run your query, and finally use
SetOption to set it back to the way it was before you
forced it.
 
Back
Top