Make a command button the default button in a form or custom dialog box

Microsoft Office Access 2003

Show All Show All

Make a command button the default button in a form or custom dialog box

When you make a command button the default button on an active form, you can choose the command button by pressing ENTER (if no other command button has the focus) as well as by clicking the designated command button. When the Default property is set to Yes for one command button, it's automatically set to No for all other command buttons on the form. Only one button can be the default on a form.

  1. Open a form in Design view.
  2. Click the command button, and then click Properties on the toolbar to open the command button's property sheet.
  3. In the Default property box, click Yes.

ShowTip

For a form that allows irreversible operations such as deletions, it's a good idea to make the Cancel button, if one exists, the default command button. To do this, set both the Cancel property and the Default property to Yes.