By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,139 Members | 1,228 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,139 IT Pros & Developers. It's quick & easy.

How to suppress pop up box.

P: n/a
I am updating a table with an SQL statement in a VBA module when you click a
command button on a form that closes the form after doing some background
stuff.

When it updates the table, it then pops open a form asking if you approve of
the update before closing the form.

How can you suppress this pop-up box.

Thanks
John Michael
Nov 13 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
On Fri, 27 Aug 2004 02:46:46 -0500, John Michael wrote:
I am updating a table with an SQL statement in a VBA module when you click a
command button on a form that closes the form after doing some background
stuff.

When it updates the table, it then pops open a form asking if you approve of
the update before closing the form.

How can you suppress this pop-up box.

Thanks
John Michael


DoCmd.SetWarnings False
DoCmd.RunSQL "Your SQL here"
DoCmd.SetWarnings False
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #2

P: n/a

The final line should actually read:

docmd.setwarnings true


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #3

P: n/a
"John Michael" <jo***@acadiacom.net> wrote in message news:<10*************@corp.supernews.com>...
I am updating a table with an SQL statement in a VBA module when you click a
command button on a form that closes the form after doing some background
stuff.

When it updates the table, it then pops open a form asking if you approve of
the update before closing the form.

How can you suppress this pop-up box.

Thanks
John Michael


DoCmd.SetWarnings False 'turn off warnings
DoCmd.OpenQuery "qryUpdateStuff"
DoCmd.SetWarnings True

Be sure to set the warnings true in the Error event of your routine or
they'll be suppressed globally.
Nov 13 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.