Microsoft Office Tutorials and References
In Depth Information
Creating command buttons
Creating command buttons
Command buttons perform a wide variety of actions. The
Command Button Wizard provides a simple interface through which
you can tailor the action of the button. When you create a
command button with the Command Button Wizard, it will create a
macro (the On Click embedded macro). We discuss macro
programming is in Section 12, “Introducing the power of macros,”
starting on page 219.
For example, in the Form Operations category, the Open Form
action displays a list of forms in your database and allows you to
create a button that opens a form, and in the Report Operations
category, the Preview Report action opens a selected report in
print preview.
Create a command button
1 On the Form Design Tools ribbon, click the Design tab with a form
open in design view.
2 Click the Command Button button in the Controls toolbox.
3 Position the button on the form.
4 Select a category of commands.
5 Select an action for the command category.
6 Click Next.
7 Select an image for the command button. (You can also browse to
add your own images for the command buttons.)
2
1
3
4
6
5
7
TIP If you display the properties for this control and look on
the Event tab, you will see that an embedded macro has been
created for the On Click event. Clicking the build button (…) will then
open the Macro Editing Tool, which allows you to create a rich and
sophisticated sequence of steps behind the button click.
Search JabSto ::




Custom Search