Report view is incorrect

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a report that when opened, runs a macro that outputs the
report to an excel spreadsheet and also sends the report in a snapshot format
to an email in Outlook.
The problem is...the information in the email attachment is correct, but
after the macro finishes running, the report opens and only displays a couple
lines of the information.
If the report is opened without the macro running, all information is
displayed correctly.

Any help will be greatly appreciated!
 
One problem with Macros is a lack of error handling. Sometimes they just
freeze up and other times they ignore the error and keep chugging along.

Try this: With the database window on Macros, click once on the macro in
question. Do not open or run it. Next go to Tools, Macros, Convert Macros to
Visual Basic. Let Access do its thing then try running the model code
created. See what happens then.
 
Open the report in design view.

Remove the reference to the macro.

Open the report's Property sheet and go to the Events tab. Click in the On
Open event line. You will see a little button with three dots. Click on it
and select Code Builder. In the next screen put the name of the code created
after converting the macro. This will be a Sub or Function. It's NOT the name
of the module. You need to open up the module to see the sub or function
name. Shouldn't need the ().
 
That unfortunatly did not work.
I received the 'Conversion finished' message and then tried running the
report with the same results.

Any other suggestions?

Thanks in advance!
 
I have been trying to find some posts about what code should look like using
a module name, but have not had any luck.
If anyone can offer help, it will be greatly appreciated!
 
Back
Top