Visual Basic Reference

CausesValidation Property

See Also Example Applies To

Returns or sets a value that determines whether the Validate event will occur on a second control from which the second control's focus is being shifted.

Syntax

object.CausesValidation [ = boolean]

The CausesValidation property syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
boolean A Boolean expression that specifies whether the control from which the focus is being shifted fires the Validate event.

Settings

The settings for boolean are:

Setting Description
True (Default) The control from which the focus has shifted fires its Validate event.
False The control from which the focus has shifted does not fire its Validate event.

Remarks

The CausesValidation property works in tandem with the Validate event to limit when a control can lose focus.