Access 2010 Turn off warnings

I'm using the macro builder to run multiple macros.  Each macro throws 3 warnings, is there a way to turn these off?
JAMES125Asked:
Who is Participating?
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
docmd.setwarnings off
docmd.setwarnings on
Compile error

docmd.setwarnings False
docmd.setwarnings True



NOTE:  Be EXTREMELY careful with SetWarnings = False in VBA code.  If you forget to execute a SetWarnings True ... and/or you code errors out ... leaving a False condition in effect ... you will run into a load of other undesirable issues ... such as ...

You open a form in Design view .... you make some changes ... you decide NOT to keep those changes ... you click the Close button ... expecting to see a WARNING message asking Do you want to ....
You WILL NOT see that message and the changes will be saved ... if a prior SetWarnings False is still in effect.  There are many other situations.

Instead, use the following:

With CurrentDB
     .Execute "Query1", dbFailOnError
     .Execute "Query2", dbFailOnError
     .Execute "Query3", dbFailOnError
 ' more ...
End With

This prevents the annoying prompt when using running Action queries, and will still expose (trappable) errors that you *may* want to know about, if the action query fails for any reason.
mx
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
You may need to be sure your db is in a Trusted Location, which can be set up via that Access UI >>Options>>Trust Center.

Check that first ...

mx
0
 
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database ArchitectCommented:
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Rey Obrero (Capricorn1)Commented:
File > options > trust center, click on Trust center settings
select Macro settings, select
* enable all macros..
or
* disable all macros except digitally signed macros

see this link

http://msdn.microsoft.com/en-us/library/bb203849.aspx

scroll down to
Figure 3. Choosing whether to run macros and whether you receive notification if macros are disabled





0
 
JAMES125Author Commented:
I probably need to provide more information.  For instance, I have a button on a form.  When this button is triggered it runs 3 different append queries.  Each append query notifies me that it will chagnge the contents of a table (twice).  How can I turn this off?
0
 
Rey Obrero (Capricorn1)Commented:
File > options > client settings ,
Editing section
Confirm options, uncheck Action queries, Record changes
0
 
Rey Obrero (Capricorn1)Commented:
or you can place
docmd.setwarnings off
'run queries here

docmd.setwarnings on
0
 
Rey Obrero (Capricorn1)Commented:
if you are using sql statements in VBA, you can use

currentdb.execute sql,dbfailonerror
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.