A family of Microsoft relational database management systems designed for ease of use.
On Print & Report Load Event errors
I can’t get the On Print Event, nor the Report Load procedures to work. I can select [Event Procedure] without adding code. With On Print when I try to see the report in Print Preview by right clicking the report and selecting Print Preview, I get this error:
“The expression On Load you entered as the event property setting produced the following error: Variable not defined.”
* The expression may not result in the name of a macro, the name of a user-defined function, or [Event Procedure].
* There may have been an error evaluating the function, event, or macro.
If I go to print preview in code, I just get a screen flash.
I get the same error when right clicking on Report Load. However, the report opens after clicking OK on the error popup. It opens without an error popup if opened with code. Either way, it doesn’t fire the Report Load event procedure.
While I’m asking for help, I have another problem. I put a text box in the page footer and used the Expression builder to make it a calculated control to get page numbers. The builder returned: ="Page " & [Page] & " of " & [Pages]. Running the report, I get #Name?
Any help is definitely appreciated.
BTW, I have the latest updates. The version drop-down below doesn't have Family. That's what I have.
Microsoft 365 and Office | Access | For home | Windows
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.