Report view is incorrect

C

CMTH

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!
 
J

Jerry Whittle

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.
 
J

Jerry Whittle

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 ().
 
C

CMTH

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!
 
C

CMTH

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top