Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
|
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access 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 March 22nd, 2004, 06:08 PM
Authorized User
 
Join Date: Mar 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default How can I turn off Warning information?

In the code below I perform a save to a file name as well as appending one table to another table for history reasons. I don't want the end user to be confronted with pop up questions about are you sure you want to run this query and son on.
How can I turn off those types of questions in VBA like you can in a macro with the SetWarnings command?


Private Sub cmdSaveConsumable_Click()
DoCmd.TransferText acExportDelim, , "qryExportConsumables", "T:\Consumables.prn", True
 Dim stDocName As String
    stDocName = "qryAppend to Consumable History"
    DoCmd.OpenQuery stDocName, acNormal, acEdit
lblSavemsg.Visible = True
End Sub

 
Old March 22nd, 2004, 06:32 PM
Authorized User
 
Join Date: Mar 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I did some searching in some of the past posts and found the answer on 3/4/04

DoCmd.SetWarnings False



 
Old March 23rd, 2004, 09:11 AM
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
Default

Quote:
quote:Originally posted by Brian263
 I did some searching in some of the past posts and found the answer on 3/4/04

DoCmd.SetWarnings False
True, Brian, but remember to set it to TRUE right after your code block to make sure you turn warnings back on. You want to be alerted of problems in other parts of your database if they arise.


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





Similar Threads
Thread Thread Starter Forum Replies Last Post
Search - Turn Off All Sites druk BOOK: Beginning SharePoint 2007: Building Team Solutions with MOSS 2007 ISBN: 978-0-470-12449-9 1 December 18th, 2007 12:49 PM
cookie turn off swagatika ASP.NET 1.0 and 1.1 Basics 2 March 15th, 2006 09:25 AM
Hidden field won't turn blank wirerider ASP.NET 2.0 Basics 1 February 28th, 2006 06:37 PM
to turn Calculation OFF for all except one column alienscript Excel VBA 1 December 17th, 2003 09:01 AM
Turn a table on its side nbryson SQL Language 12 August 20th, 2003 08:01 AM





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