Microsoft Access 2010 Bible

(Rick Simeone) #1

Part IV: Professional Database Development


1062


The macro that opens the reports uses submacros, as well as the Condition column. Table 30.3
shows the submacro names, conditions, actions, and action arguments for mcrReportMenu (a
portion of which is shown in Figure 30.10), which opens one of three reports. The Filter Name
and Where Condition arguments are blank for each OpenReport action.

FIGURE 30.9

frmReportMenu uses a frame to select the view in which to open the Contacts, Products, and Sales
reports.


TABLE 30.3

mcrReportMenu


Submacro Name Condition Action

Action
Argument

Action
Argument
Setting

OpenContacts [Forms]![frmReportMenu
]![fraView]=1

OpenReport Report Name rptContacts

View Print
Window Mode Normal
[Forms]![frmReportMenu
]![fraView]=2

OpenReport Report Name rptContacts

View Print
Preview
Window Mode Normal
OpenProducts [Forms]![frmReportMenu
]![fraView]=1

OpenReport Report Name rptProducts

View Print
Preview
Window Mode Normal
Free download pdf