Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


How do I stop access 2007 from crashing when I choose to view a report in my database?

Posted on 2007-12-06
Medium Priority
Last Modified: 2013-11-28
Every time I choose to view a report in my access database (2007) - the program crashes and I need to restart it. I don't lose any data, its just very time consuming.  I know very little about Access and just use a database, but have no knowledge on how to create a database.  Can you walk me through steps to get this to stop happening?  Again, the database I am working in was created in the previous version of Access and I am now working in the 07 version with a Vista operating system.
Question by:mamltd
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 20421245
Create the error

on the run line start   eventvwr.msc

Look at the Microsoft Office Session log
Look at the Application Log

Use the date time stamp to find the event that coincides with Access
Event ID's and other things in the log will help us diagnose the issue.

Expert Comment

ID: 20421332
In Access 2001

If is 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:

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

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:

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
    Recovering from Corruption 
LVL 75
ID: 20421435
Since you are working with A2007, these will probably come in handy at some  point:

Bug lists for A2007 - a good reference in general:   'A2007 bug list

Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

LVL 75
ID: 20421446
Also ... corruption my be present here from the upgrade ... follow this procedure step by step.

A **DeCompile** may help here ...

But first, if you have not already:
Check for any **Missing References via the VBA Editor>>Tools>>References ....

Then, follow this procedure:

0) **Backup your MDB**
1) Compact and Repair the MDB, as follows:
Hold down the Shift key and open the MDB, then from the menu >>Tools>>Database Utilities>>Compact and Repair ...
2) Execute the Decompile (See example syntax below) >> after which, your database will reopen.
3) Close the mdb
4) Open the mdb and do a Compact and Repair (#1 above).
5) Open the mdb:
    a) Right click over a 'blank' area of the database window (container) and select Visual Basic Editor. A new window will open with the title 'Microsoft Visual Basic' ...

followed by then name of your MDB.
    b) From the VBA Editor Menu at the top of the window:
        Note ... after the word Compile will see the name of your 'Project' - just an fyi.

6) Close the mdb
7) Compact and Repair one more time.

*** Executing the DeCompile **EXAMPLE**:
Here is an example of the command line syntax  (be SURE to adjust your path and file name accordingly) for executing the decompile:

Run this from Start>>Run, enter the following command line - **all on one line** - it may appear like two lines here in the post:

"C:\Program Files\Microsoft Office\Office\Msaccess.exe" /decompile "C:\Access2003Clients\AzDoc\Pgrm\AzDocPgrm2K3.mdb"

For more detail on the Decompile subject ... visit the Master on the subject (and other great stuff) Michael Kaplan:

LVL 20

Accepted Solution

clarkscott earned 1500 total points
ID: 20422261
Make your report source a query.  If it already is, open the query in design mode (gui) and right click in any blank area at top of query screen.  Select PROPERTIES from the drop-down list.  Scroll down and find Recordset Type and change to SNAPSHOT.

This relieves Access of handling 'edit - able baggage' ... and you're not updating records on a report anyway.....

Scott C
LVL 75
ID: 20422567
I'm curious as to how this actually solved the issue?  


Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question