Opening Report from Form Button Crashes Access

M

mpfohl

This one will be tough to describe because I can't seem to nail down
the variables involved.

I have a form with a bunch of code behind it and several buttons. Two
of the buttons open up two different reports. Sometimes when i click
either of the buttons, access crashes and does not report an error
(even though the code behind the button says to display errors). Other
times, clicking either button works just fine.

If I open either report without using the form, it works fine. The
only other thing i've noticed is it tends to do this more often when I
open up the form through the 'switchboard' and then click on the form's
button to open the report, but other times going through the switch
board allows it to work just fine.

Things I've tried to resolve the issue:
- Used the 'watch' feature with debugger in VBA to go through the code
as the button activates. The area it crashes is always the same line
that is simply the command to open the report: DoCmd.OpenReport
RptNam, acViewPreview
but again, other times it will step through just fine.
- My database has a front end and back end, i've tried reimporting the
front end in and it still crashes periodically.
- I tried creating a blank database and importning the data into it in
case the old file was corrupt. Same thing, some times it crashes,
other times it doesn't.
- I've tried turning the mdb front end into an mde file, still crashes
some times.
- I've tried 'compact and repair database' and still crashes some
times.

Any suggestions of what else to try to help debug this would be really
appreciated. I'm just not sure where else to look to get more
information on what the problem is so I can begin to try fixing it!
 
M

mpfohl

The key really seems to be when the form is opened through the
Switchboard it's button crashes more often but I can't for the life of
me figure out how that would make a difference. Why would it matter
whether the switchboard opened it or whether a user just double clicked
on the form?
 
D

Damian S

Howdy...

I experienced this same issue in Access 2003 at a client site where the
reports worked fine on my development machine, fine on some machines onsite
and crashed Access on other machines...

The problem turned out to be the machines it worked on had Office 2003 SP2
installed, the ones that crashed didn't. Installing SP2 resolved the issue.

Damian.
 
M

mpfohl

SP2 is already installed on the computer so unfortunatly that doesn't
seem to be it. Any other ideas?
 

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