Microsoft Office Tutorials and References
In Depth Information
Linking together forms
Linking together forms
The OpenForm, OpenReport, OpenTable, and OpenQuery
macro commands are among the most common and easiest
to use. These commands allow you to open other forms, print
reports, or display data in tables and queries. Normally, these
macro commands are used on a command button control’s
OnClick event, but they can also be used as macros independent
of a form.
Each control on a form has a set of events, and the On Click
event for a button is activated when a user clicks the button.
You will find that you do not need to understand all the
available events and that you can accomplish most programming
with only a few of them.
2
3
Create an embedded macro to open
a form
1 With a form in Design view, click to expand the controls list, and
turn off the Use Control Wizards option.
2 Click the Button control, and click in the form to add the button to
the form.
3 In the Property Sheet pane, click the Event tab, then click the Build
button for the On Click event.
4 In the Choose Builder dialog box, select the Macro Builder, and click
OK.
1
4
In the Add New Action drop-down box, select OpenForm from the
list of commands.
5
(continued on the next page)
5
TIP If you leave the Control Wizard active when adding a
button, after navigating through the wizard choices, you will
find that an embedded macro has been added behind the button’s On
Click event. This useful feature might get in the way when you want to
write your own embedded macros. You can click the Control Wizard
option to switch off this feature.
Search JabSto ::




Custom Search