Share via


Command Button Control (Forms)

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

A command button on a form can start an action or a set of actions. For example, you could create a command button that opens another form. To make a command button do something, you write a macro or event procedure and attach it to the button's OnClick property.

Note   This control should not be confused with the Dynamic HTML command button control used on a data access page. For information about a command button control on a data access page, see Command Button Control (Data Access Pages).

Remarks

You can display text on a command button by setting its Caption property, or you can display a picture by setting its Picture property.

Tip   You can create over 30 different types of command buttons with the Command Button Wizard. When you use the Command Button Wizard, Microsoft Access creates the button and the event procedure for you.