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