Default Property

See AlsoAE9G2O

Applies To

Command buttonXJSPC0.

Description

Determines which command button is the default button on a form.

Usage

[form.]commandbutton.Default[ = { True|False}]

Setting

The Default property settings are:

Setting             Description

 

True                The command button is the default button.  Only one button on a form can be the default button.  When Default is set to True for one button, it is automatically set to False for all other buttons on the form.  When the button's Default property is True and its parent form is active, the user can choose the button (invoking its Click68UQAKP event) by pressing the Enter key.  Any other control with the focus1L3L8ZY does not receive a keyboard event (KeyDownRI06O6, KeyPressPFFDUA, or KeyUpRI06O6) for the Enter key unless the user has moved the focus to another command button on the same form.  In this case, pressing Enter chooses that button instead of the default button.

False               (Default) The command button is not the default button.

 

Remarks

For a form or dialog box that supports an irreversible action such as a delete operation, make the Cancel button the default button by setting its Default property to True.

Data Type

IntegerDOKXHY (Boolean)


See Also

Help:

Cancel PropertyKQ58YS

 

Programmer's Guide:

Chapter 3, "Creating and Using Controls"