Article ID: 229802 - Last Review: April 6, 2007 - Revision: 6.1 How to use SetOption to disable warning messages in an Access ApplicationThis article was previously published under Q229802 Moderate: Requires basic macro, coding, and interoperability skills.
This article applies only to a Microsoft Access database (.mdb or .accdb). SUMMARY
This article shows you how to use the Application.SetOption method to disable warning messages in an Access application.
MORE INFORMATIONMicrosoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
Action queries and other processes that append, delete, or modify data typically present the user with a warning that the data is about to be modified. In a run-time application, however, it is often desirable to disable the warnings because checks and precautions are usually beyond the user's control. You can accomplish this by using the SetWarnings method of the DoCmd object, but you may prefer to disable warnings for the entire application. To do that, you can use the SetOption method of the Application object. However, if you do so, you should also turn the warnings back on as the application quits. To do this in a simple, one-form application, follow these steps:
| Article Translations
|
Back to the top
