Access 2010 crashing - help

Posted on 2011-10-07
Last Modified: 2012-05-12
I have a front end file in Access 2010, with a separate data back-end. They have been working fine together.
I made a change to a single line of code (adding one more field to a sql string - setting the datasource for a continuous subform in a procedure) - and nothing else... the program crashes when i try to run it OR when I simply try to open up the Visual Basic code. It did this several times. This code isn't even in the form that is loading when the program loads.
I do not get a specific program error, but the generic "Microsoft Access has stopped running" and it hangs...
Before making the change, I have compacted and repaired both front and back-end.
Any ideas???
Question by:terpsichore
    LVL 75

    Accepted Solution

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

    But first, if you have not already:
    Open the VBA Editor and from the menu ...Tools>>References ....
    If you see any listed as **Missing: <reference name>, including the asterisks and the word Missing, the
    you need to fix that first.

    Then, follow this procedure:

    0) **Backup your MDB BEFORE running this procedure**
    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 ...
    Close the mdb after the Compact & 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) Close the mdb.
    6) 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.

    7) Close the mdb
    8) 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) before 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:
    Also, the double quotes are required.

    "C:\Program Files\Microsoft Office\Office\Msaccess.exe" /decompile "C:\Access2003Clients\YourMdbNameHERE.mdb"

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

    AND ...
    Once you get familiar with the Decompile idea (and ALWAYS make a BACKUP first!) ... you can add both Decompile and Compact/Repair to the Right Click menus in Windows Explorer, which I use multiple times daily:

    Getting the Decompile and Compact context menu options


    Author Comment

    i will try that (may be over the weekend) and get back to you - thank you so much in advance, i will report back
    LVL 39

    Expert Comment

    Reference to menu options in:
    is broken.
    You can use this registry patch (for Access 2010):
    Windows Registry Editor Version 5.00
    "Content Type"="application/msaccess"
    "Content Type"="application/x-msaccess"
    @="Microsoft Access Database"
    @="C:\\Program Files\\Microsoft Office\\Office14\\MSAccess.exe \"%1\" /DECOMPILE"
    @="C:\\Program Files\\Microsoft Office\\Office14\\MSAccess.exe \"%1\" /COMPACT"

    Open in new window

    (correct path to MsAccess.exe, save this text as reg and run)
    LVL 84

    Assisted Solution

    by:Scott McDaniel (Microsoft Access MVP - EE MVE )
    Also, once you do the decompile option you should then Compile your VBA Code. To do that, open the VBA Editor and click Debug - Compile. Fix any code errors and continue doing this until that menu option is disabled.

    If the fixes suggested by mx work I'd also further encourage you to build a new, blank database and import everything into that new database. While decompile will work for your objects, there's also the possibility that you have container corruption and decompile won't fix that.

    I would say you could also try the SaveAsText/LoadFromText methods, but since you can't open the VBA Editor at this point it wouldn't do much good :)

    If the fixes don't work, then your only option would be to either (a) restore from a recent backup or (b) send the db to a recovery specialist like
    LVL 9

    Expert Comment

    by:Armen Stein - Microsoft Access MVP since 2006
    Did you install SP1?  Many problems have been reported with VBA instability after SP1 is installed.  You may want to try uninstalling it.

    Apparently there is a fix scheduled this month:
    LVL 75

    Expert Comment

    by:DatabaseMX (Joe Anderson - Access MVP)
    "Reference to menu options in:
    is broken."

    Works for me right now (10-8-2011 10:25 pdt). has been up/down lately ... not sure what's up.

    Also, once you do the decompile option you should then Compile your VBA Code. To do that, open the VBA Editor and click Debug - Compile. Fix any code errors and continue doing this until that menu option is disabled."

    That's included in the procedure I posted.

    LVL 84
    <That's included in the procedure I posted.>

    Sorry ... didn't see it in there.

    Author Comment

    Thanks to everyone; I'm still diagnosing this.

    Author Closing Comment

    I would like to have awarded more people - I was amazed by the smart and thoughtful responses. In the end, I upgraded my already reasonably current software, including BIOS, and the problem disappeared. I also learned an incredible amount from these posts. Thank you to all.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
    In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
    Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    731 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now