Rozgonyi
Rozgonyi

Reputation: 1059

Triggering MS Access Macro when emailing PDF of Report

I created a Macro in MS Access 2010 for the OnLoad event of a report that hides a subform on the report if a check box on the report is not checked. That works fine but what I am trying to do now is have the same thing happen when I click the button that activates a macro calling the EMailDatabaseObject function that generates an email with a pdf of the report attached. The email with the attached pdf works fine but the macro doesn't run.

What event do I attach the macro to so that it happens when it is outputted to pdf?

Upvotes: 0

Views: 57

Answers (1)

Dave
Dave

Reputation: 136

Move the existing macro from the On Load event to the On Open event of the report.

Upvotes: 1

Related Questions