Microsoft KB Archive/209200

= ACC2000: SetWarnings Action Works Only While Macro Is Running =

Article ID: 209200

Article Last Modified on 6/24/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q209200



Moderate: Requires basic macro, coding, and interoperability skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).



SYMPTOMS
If you turn off system messages with a SetWarnings macro action, system messages remain off only while that macro or set of macro actions is running.



CAUSE
Microsoft Access turns the display of system messages back on when the macro containing the SetWarnings action is finished.



MORE INFORMATION
You can use this action to prevent modal warnings and message boxes from stopping the macro. However, error messages are always displayed. Also, Microsoft Access displays any dialog boxes that require input other than simply clicking a button (such as OK, Cancel, Yes, or No) - for example, any dialog box that requires you to type text or select one of several options.

Carrying out this action with the Warnings On argument set to No has the same effect as pressing ENTER whenever a warning or message box is displayed. Typically, an OK or Yes button is clicked in response to the warning or message.

When the macro finishes, Microsoft Access automatically turns the display of the system messages back on.

