Preview Report from Form causes CRASH!

  • Thread starter Thread starter Susan
  • Start date Start date
S

Susan

We are running Access 2000 in Windows XP.

I have used the wizard to place several command buttons
on a form that previews a report when clicked. These
have been working fine for the past few years, but in the
last month or so, when I click the button I get the Error
Message:

"Microsoft Access for Windows has encountered a problem
and needs to close. We are sorry for the inconvenience."
Of course the only options are to "Send Error Report"
or "Don't Send" and when either are clicked, the entire
Access Program shuts down!

If I go around the form and just open the report from the
database window, it works fine. Is there a windows
update or something that could have caused this? Is
there a fix that I can make to get this working like it
should again?

Thanks for your help!!
 
We are running Access 2000 in Windows XP.

I have used the wizard to place several command buttons
on a form that previews a report when clicked. These
have been working fine for the past few years, but in the
last month or so, when I click the button I get the Error
Message:

"Microsoft Access for Windows has encountered a problem
and needs to close. We are sorry for the inconvenience."
Of course the only options are to "Send Error Report"
or "Don't Send" and when either are clicked, the entire
Access Program shuts down!

If I go around the form and just open the report from the
database window, it works fine. Is there a windows
update or something that could have caused this? Is
there a fix that I can make to get this working like it
should again?

Thanks for your help!!

You probably have picked up some corruption in the code to open the
report.
Try deleting code behind the command button click event first.
Then re-write it.
The code to open a report in Preview is:
DoCmd.OpenReport "ReportNameHere", acViewPreview.

If you have criteria to add, write down the current criteria before
you delete the code. Then include it in the new code.

If that still doesn't work, delete the code, then delete the command
button (in that order).
Use the Command button wizard to create a new button.
 
Back
Top