ACC2000: SetValue Action Does Not Set the Value for Page One of a Report (207864)
The information in this article applies to:
This article was previously published under Q207864 Moderate: Requires basic macro, coding, and interoperability skills.
This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).
SYMPTOMS
When you run a macro that carries out an OpenReport action, and then
carries out a SetValue action that sets the value for controls on the report being opened, the controls on the first page of the report are not updated by the SetValue action.
CAUSE
The SetValue action is carried out after the report is opened. After the report is opened, it is too late to change the values for controls that
appear on the first page. The SetValue action should be placed in a macro that is triggered from the Format event of the control's report section or the Activate event of the report.
RESOLUTION
Create a macro that contains the SetValue action, and attach that macro to the Activate event of the report or the Format event of the control's report section. Then, the controls on the first page of the report display the correct values.
REFERENCESFor more information about the order of events in reports, click Microsoft Access Help on the Help menu, type find out when events occur in the Office Assistant or the Answer Wizard, and then click Search to view the topic.
Modification Type: | Major | Last Reviewed: | 6/24/2004 |
---|
Keywords: | kbprb KB207864 |
---|
|