Prev | Current Page 929 | Next

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

"Access 2007 Bible"

Retreat is included in all
sections except headers and footers.
439
Understanding the Access Event Model 12
Using the Format event
Use the Format event to apply special formatting to controls within a section before the section is
printed. Format is useful, for instance, to hide controls you don??™t want to print because of some
condition in the report??™s data. The event procedure runs as Access lays out the section in memory,
but before the report is sent to the printer.
You can set the OnFormat and OnPrint event properties for any section of the report. However,
OnRetreat is not available for the page header or page footer sections.
For example, you may want to hide some data on the form, based on certain conditions. If the condition
is met, the event procedure uses the control??™s Visible property to show or hide the control.
Figure 12-10 shows the Properties window for the OnFormat property of the detail section of
the rptProducts report. Notice that the bar separating the Detail section from the ProductID
header is selected so that the OnFormat property can be set for the Detail section.


Pages:
917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941
muzykunia na r cyfra+ gorzów wielkopolski Evier 3 music regeneracja tonerów