Access crashes upon save/preview

D

dtslater

I am having a problem with Access. Whenever I am in 'Design Mode' in a Report,
Access crashes when I click Save or try to Preview the report. There is not
an error message. I have to restart Access.

What interesting is that I can go to the Query and it will run fine. Then, I
go to the 'Reports' and double click my report and it will run perfectly. But
when I go into Design mode from viewing the report, the program crashes if I
make a change and try to save or simply hit the 'Preview' button the program
crashes.

What do you guys think? I really need some help here.
 
A

Allen Browne

What version of Access is this?

If 2007, and it happens when you change a property in the Properties sheet,
does it make a difference if you press Enter before saving/closing? This has
the effect of getting Access to evaluate the change you made (as it moves to
the next property) before it tries to save.

If this is not the issue, does this happen with one report only, or with all
reports? If all reports in all databases (even Northwind), try installing a
completely different printer and making it default. Then open Access again.
Access uses the printer driver to calculate the report layout, and a faulty
driver can cause it to crash. If this fixes it, see if you can get an
updated driver for your printer.

If it happens with one report, only, it would seem that this report is
partially corrupt. Here's a standard sequence for addressing a range of
issues and trying to fix this corruption. Try the sequence in order:

1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
In Access 2007, it's:
Office Button | Access Options | Current Database | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Compact the database to get rid of this junk:
Tools | Database Utilities | Compact/Repair
or in Access 2007:
Office Button | Manage | Compact/Repair

3. Close Access. Make a backup copy of the file. Decompile the database by
entering something like this at the command prompt while Access is not
running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

4. Open Access (holding down the Shift key if you have any startup code),
and compact again.

5. Open a code window.
Choose References from the Tools menu.
Uncheck any references you do not need.
For a list of the ones you typically need in your version of Access, see:
http://allenbrowne.com/ser-38.html

6. Still in the code window, choose Compile from the Debug menu.
Fix any errors, and repeat until it compiles okay.

7. Still in the code window, choose Options on the Tools menu. On the
General tab, make sure Error Trapping is set to:
Break on Unhandled Errors
and the Compile on Demand is unchecked.

At this point, you should have a database where the name-autocorrect errors
are gone, the indexes are repaired, inconsistencies between the text- and
compiled-versions of the code are fixed, reference ambiguities are resolved,
the code syntax is compilable, and the VBA options are set to show errors
and avoid this kind of corruption.

If it is still a problem, the next step would be to get Access to rebuild
the database for you. Follow the steps for the first symptom in this
article:
Recovering from Corruption
at:
http://allenbrowne.com/ser-47.html
 

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