Connecting Tech Pros Worldwide Forums | Help | Site Map

How to suppress pop up box.

John Michael
Guest
 
Posts: n/a
#1: Nov 13 '05
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



fredg
Guest
 
Posts: n/a
#2: Nov 13 '05

re: How to suppress pop up box.


On Fri, 27 Aug 2004 02:46:46 -0500, John Michael wrote:
[color=blue]
> 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[/color]

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.
ColinWard
Guest
 
Posts: n/a
#3: Nov 13 '05

re: How to suppress pop up box.



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!
Pieter Linden
Guest
 
Posts: n/a
#4: Nov 13 '05

re: How to suppress pop up box.


"John Michael" <johnm@acadiacom.net> wrote in message news:<10itpn4h6go5k51@corp.supernews.com>...[color=blue]
> 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[/color]

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.
Closed Thread