ACC2000: SetWarnings Action Works Only While Macro Is Running (209200)



The information in this article applies to:

  • Microsoft Access 2000

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.

REFERENCES

For more information about the SetWarnings action, click Microsoft Access Help on the Help menu, type setwarnings action in the Office Assistant or the Answer Wizard, and then click Search to view the topic.

Modification Type:MajorLast Reviewed:6/24/2004
Keywords:kbprb KB209200