Standard message on update query

T

Tiago

Hello my friends,

I'm running a few update queries through a macro.
There's one macro with 8 queries and everytime I run the macro the access
pops up the usual messages like "you're about to run an update query, etc.
etc.".
Is there anyway that I could set the system not to show these messages and
simply execute the query?
THanks in advance!

Tiago.
 
T

Tom Wickerath

Hi Tiago,

Yes, you can use a Set Warnings statement in a macro, but my advice is to
convert your macros to VBA (Visual Basic for Applications) code. Here is a
Word document that you can download that shows examples:

http://www.accessmvp.com/TWickerath/downloads/ActionQueryExamplesWithSetWarnings.doc

You did not say which version of Access that you are using, but if it is
Access 2003 or earlier, then you simply cannot trap for errors in a macro.
Instead, a user will get a really ugly macro error dialog presented. You can
trap for and gracefully handle errors using VBA code. Access 2007 is the
first version that allows trapping for errors in macros.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________
 
T

Tom van Stiphout

On Sun, 2 Mar 2008 16:13:00 -0800, Tiago

Check out:
Docmd.Setwarnings
in the help file.

-Tom.
 
T

Tiago

Thank you very much.
Problem solved.

Tom van Stiphout said:
On Sun, 2 Mar 2008 16:13:00 -0800, Tiago

Check out:
Docmd.Setwarnings
in the help file.

-Tom.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top