How to remove the MsgBox generate by "append query"?

I have create a table by using "make query" and "append query", the default message boxes appeared when I run these queries. It's very disturbing. Can I remove them when running the query? please let me know asap.
May020698Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DedushkaCommented:
Go to Menu-Tools-Options-Edit/find tab-Confirm group and uncheck "Action Queries" check box.
0
JimMorganCommented:
The simpliest way to have your cake and eat it too, is to leave the Action Queries checked, so that you verify that the query did the proper thing when you are testing it, but to run the query in code with the DB.Execute function.

DB.Execute strQueryName

or

DB.Execute strSql


Or put the Warnings Off before the query runs and turn the Warnings On afterwards.

DoCmd.SetWarnings False
DoCmd.RunSql strQueryName or strSQL
DoCmd.SetWarnings True

I prefer the Execute method.  It is only one line.

Jim
0
TrygveCommented:
What is also nice about the Execute method is that you can use DB.RecordsAffected afterwards to see  and, if you like, display the number of affected records.
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.

CareyMBilyeuCommented:
May, I use JimMorgans method all the time to get rid of the nagging prompts while performing action queries. The problem with going to the Tools menu is that if you distribute the app to someone else who has that turned on, they will get the prompts regardless. (That is if you distribute apps w/o custom toolbars).

CB
0
ssamCommented:
I concur with Jim Morgan wrt SetWarnings.  you  also might add "DoCmd.Hourglass True" before you launch your SQL and have "DoCmd.Hourglass False" after you unset the warnings.  this will give the user a visual method of knowing to wait and be patient if the SQL command takes a while.   ---ssam
0
gigo30Commented:
To turn off the confirmation messages when making tables via queries, do this:
DoCmd.SetWarnings False

Then when you are done, set them back to warn you:
DoCmd.SetWarnings True

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ssamCommented:
May, gigo30's answer to your question is a lift from Jim Morgan.  you might want to reject his answer since jim posted first.
0
DedushkaCommented:
Sorry, friends, but my answer posted first and I can propose first to disable warnings by unchecking "Action Queries" check box, then to turn on SetWarning "so that you verify that the query did the proper thing when you are testing it" and then turn it off :-)
0
TrygveCommented:
Dedushka: Sorry, but I don't think your solution is very good. Turning of the notifications for Action Queries makes development harder, and switching it on and off will not make the process any easier. But if this is the solution May will use, then of course, you should get the credit. Remember though, that you will need to set this up on you clients PCs since this is not the default setting like CareyMBilyeu mentioned.

I find SetWarnings better since this enables you to decide from one case to the other if you want the notifications or not.

The best solution though, also described by Jim, is db.execute which is both faster, does not notify and gives you the RecordsAffected property, which can be used if you would like to show information about the effect of the query or store the info somehow.
0
CareyMBilyeuCommented:
I would have to agree with Trygve, Three cheers and a beer...  :-P
0
cjswimmerCommented:
The way to turn of the confirmation for action queries in code is to use:
SetOption "Confirm Action Queries", False

Many other options are available with SetOption as well.

CJSWIMMER
0
JimMorganCommented:
Dedushka:

Re-read your comment.  You said the first part and maybe thought you said the second.

gigo30:  Why are you running around answering questions which not only have been worked on by several experts and in this case, at least, with an answer that already been provided?

Jim
0
cjswimmerCommented:
wow that sucks.  JimMorgan got ripped off.
0
JimMorganCommented:
cjswimmer:

Thanks for the comment.  At least he only got a 'B' grade and based on his profile, he only comes in and does acts like this about twice a year.

It would be nice if he explained his actions but I'm afraid that we will not hear from him again.

It's tough on the members who ask questions, in a situation like this.  A lot of them feel embarassed for rejecting an answer which is technically correct although it had been given in a previous comment.  I feel that they might not know that they can reject an answer and mark the correct comment as an answer.

The sooner the system is worked such that there is no 'answer' box and the member marks the best comment as an answer.  I understand that EE is looking into this but nothing has been resolved yet.

Jim
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

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.