Stopping Popup message in Update Query

  • Thread starter The Boondock Saint
  • Start date
T

The Boondock Saint

Hi again all,

Im wondering how I can stop the messages that pop up when im about to run a
update query,

I get the following

1. You are about to run a update query blah blah....
2. You wont be able to undo the changes this action blah blah
3. You are about to update X Rows

Idealy Id love to be able to turn off the messages in just this query, and
not globally over the whole database, can this be done?
Also, Id like to get a error if there is one.. so only stop those message
that are currently showing...

Any help would be awesome,
Cheers Saint
 
R

Richard Williams

The Boondock Saint said:
Hi again all,

Im wondering how I can stop the messages that pop up when im about to run
a
update query,

I get the following

1. You are about to run a update query blah blah....
2. You wont be able to undo the changes this action blah blah
3. You are about to update X Rows

Idealy Id love to be able to turn off the messages in just this query, and
not globally over the whole database, can this be done?
Also, Id like to get a error if there is one.. so only stop those message
that are currently showing...

Any help would be awesome,
Cheers Saint
You will need to run the query from VBA or a macro. If you run the query
from a macro then first choose the command Set Warnings and set warnings on
to No. The next line of your macro should run the query and then you should
include another line to set the warnings back on to Yes.
 
F

fredg

Hi again all,

Im wondering how I can stop the messages that pop up when im about to run a
update query,

I get the following

1. You are about to run a update query blah blah....
2. You wont be able to undo the changes this action blah blah
3. You are about to update X Rows

Idealy Id love to be able to turn off the messages in just this query, and
not globally over the whole database, can this be done?
Also, Id like to get a error if there is one.. so only stop those message
that are currently showing...

Any help would be awesome,
Cheers Saint

Use code, from the click event of a command button:

1) Either ...
Do.Cmd>SetWarnings False
DoCmd.OpenQuery "UpdateQueryName"
DoCmd.SetWarnings True

The above does NOT give an error if the query fails.

2) Or... better yet, use an .Execute statement, which does not give
that warnings message.

CurrentDb.Execute "UpdateQueryName",dbFailOnError

You will only get a message if the query fails.
 

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

Similar Threads


Top