Microsoft Office Tutorials and References
In Depth Information
Creating Command Buttons
8. Specify whether the options should appear as option buttons, check
boxes, or toggle buttons; choose the style for the option group box;
and then click Next.
We strongly recommend choosing option buttons (the default), because
most people expect option buttons to be in groups of mutually exclusive
options, and they expect check boxes and toggle buttons to work
independently of one another.
The style for the option group controls the box that Access draws
around the group of option buttons; it’s an aesthetic decision.
9. Type a caption (label) for the option group, and click Finish.
The caption appears at the top of the option group. When you click
Finish, the wizard creates your option group and an option button (or
check box or toggle button, if you callously disregarded our advice) for
each value you specified.
When the wizard finishes, you can resize the option group box and move the
option buttons around inside it.
If you change the list of possible values later, the option buttons on your
form don’t change automatically. If a set of option buttons shows all the
categories of products that your store sells, and you add a new product
category, you need to remember to edit the form and add a new option button
to the option group. For this reason, combo boxes are used more frequently
to provide lists of possible values, because when you update a table from
which the combo box gets its list of values, the combo box updates
automatically the next time you open the form.
You can create a new option button to add to an option group by clicking
the Option Button button in the Controls group on the Design tab of the
Creating Command Buttons
Dialog boxes contain command buttons, such as Save and Cancel, and your
forms can, too. To create a command button, display your form in Design
view and click the Button control in the Controls group on the Design tab of
the Ribbon. When you create a command button, you tell Access what
program the button should run.
Programs can take two forms: macros (described in Book VI) and VBA
modules (described in Book VIII).
Luckily, wizards can do a lot of the work for you. You don’t need to know
how to create either macros or VBA modules to make nifty command
buttons on your forms.
Search JabSto ::

Custom Search