다음을 통해 공유


DoCmd.SetWarnings Method (Access)

The SetWarnings method carries out the SetWarnings action in Visual Basic.

Syntax

.SetWarnings(WarningsOn)

A variable that represents a DoCmd object.

Parameters

Name

Required/Optional

Data Type

Description

WarningsOn

필수

Variant

Use True (–1) to turn on the display of system messages and False (0) to turn it off.

Remarks

You can use the SetWarnings method to turn system messages on or off.

If you turn the display of system messages off in Visual Basic, you must turn it back on, or it will remain off, even if the user presses CTRL+BREAK or Visual Basic encounters a breakpoint. You may want to create a macro that turns the display of system messages on and then assign that macro to a key combination or a custom menu command. You could then use the key combination or menu command to turn the display of system messages on if it has been turned off in Visual Basic.

Sample code provided by:커뮤니티 구성원 아이콘 The UtterAccess community | About the Contributors

Example

The following example turns the display of system messages off:

DoCmd.SetWarnings False

About the Contributors

UtterAccess(영문일 수 있음)는 Microsoft Access 위키 및 도움말 포럼입니다. 가입하려면 여기를 클릭하십시오(영문일 수 있음).

참고 항목

개념

DoCmd Object

DoCmd Object Members