Wrox Programmer Forums
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old September 13th, 2004, 03:21 PM
Registered User
Join Date: Sep 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Disable/Trap msgBox??

Anybody have any idea how to use VBA to disable the msgbox that pops up with an SQL INSERT or UPDATE


DoCmd.RunSQL INSERT INTO tblTrash (intEmpty) VALUES ('1');

this will pop up a message box that says About to append 1 row.

Same occurs when you do an UPDATE query.


Andy Delgado
Old September 13th, 2004, 03:54 PM
Friend of Wrox
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG

DoCmd.SetWarnings False
DoCmd.RunSQL INSERT INTO tblTrash (intEmpty) VALUES ('1');
DoCmd.SetWarnings True

Remember to set it back to true IMMEDIATELY after issuing your SQL so you get other warnings.

Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division

Similar Threads
Thread Thread Starter Forum Replies Last Post
chap 2 about trap INT speedwolf BOOK Beginning Linux Programming, 3rd Edition 0 March 13th, 2008 01:02 AM
Need help to trap errors starnet SQL Server 2000 1 October 6th, 2006 11:05 AM
GetObject Trap bostek VBScript 2 November 24th, 2004 02:39 AM
How can I trap for a connection error cdukes77@bellsouth.net Classic ASP Databases 1 April 27th, 2004 03:09 AM
Trap for empty recordset in a SP Mitch Access VBA 2 September 5th, 2003 04:47 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.