Prev | Current Page 2139 | Next

Michael R. Groh, Joseph C. Stockman, Gavin Powell, and Cary N. Prague

"Access 2007 Bible"

The Run Command button executes mcrReportMenuEnhanced, which doesn??™t
use macro names to decide which report to open.
CAUTION
CROSS-REF
1148
Professional Database Development Part IV
FIGURE 36-12
frmReportMenuEnhanced uses a combo box to select which report to open.
Table 36-5 shows the conditions, actions, and action arguments for mcrReportMenuEnhanced
(shown in Figure 36-13), which opens one of three reports.
TABLE 36-5
mcrReportMenuEnhanced
Condition Action Action Argument Action Argument Setting
SetTempVar Name ReportName
Expression [Forms]![frmReportMenuEnhanced]!
[cboReport]
SetTempVar Name ReportView
Expression [Forms]![frmReportMenuEnhanced]!
[fraView]
[TempVars]![ReportView]=1 OpenReport Report Name =[TempVars]![ReportName]
View Print
Window Mode Normal
[TempVars]![ReportView]=2 OpenReport Report Name =[TempVars]![ReportName]
View Print Preview
Window Mode Normal
RemoveTempVar Name ReportName
RemoveTempVar Name ReportView
1149
Using Access Macros 36
FIGURE 36-13
mcrReportMenuEnhanced uses temporary variables to open the desired report in Print or Print Preview
view.


Pages:
2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151
krawężniki sport malowanie bramy przemysłowe alveus