Access Has Stopped Working

Posted on 2012-08-10
Last Modified: 2012-08-22
Hello, i am using ms access 2010 on windows 7.  I am building a application that includes many procedures.  the db is only 15 megs so far.  For some reason when I try to include additional script in any one of my procedures I get the error "Microsoft Has Stopped Working" and then it restarts.  It's as if it can't handle anymore script.  So far i have compacted and repaired the db, updated my Windows, installed Office service pak 1 and compiled it successfully and I'm still having the problem.  Any help would be greatly appreciated.  Thanks.
Question by:ilfocorp
    LVL 10

    Assisted Solution

    uninstall office using

    LVL 84

    Assisted Solution

    by:Scott McDaniel (Microsoft Access MVP - EE MVE )
    Do other databases have troubles, or only this one? If it's only this one, you might try moving everything into a new, blank database. This can clean up container corruption.

    If that doesn't work, then as chubby_informer suggests, you may need to uninstall and reinstall Office.
    LVL 56

    Assisted Solution

    by:Jim Dettman (Microsoft MVP/ EE MVE)
    <<For some reason when I try to include additional script in any one of my procedures I get the error "Microsoft Has Stopped Working" and then it restarts. >>

    From your description, it's hard to say what exactly is going on.   It may be that you have some corruption in the VBA project file of the DB. Try importing everything to a clean DB as LSM suggests and see if that clears it up.

     Be aware however that bugs in Access itself will cause the same thing, so I'd make sure your up to date on service packs as well.

     Last, as LSM asked; are you having any other problems?  Hardware (such as a bad memory module) can cause faults as well.

     To pin this down a little more, you'd have to give us some more detail about when this happens, other DB's giving you issues, other programs, this just started, always been this way, etc.

      What has been suggested so far is just the most common causes and are really just shots in the dark more or less.

    LVL 74

    Assisted Solution

    by:Jeffrey Coachman
    < For some reason when I try to include additional script in any one of my procedures I get the error "Microsoft Has Stopped Working" and then it restarts. >

    Meaning the database was working fine, then when you added one "Particular" piece of code, you got this error?

    Try unloading all the code, then adding each sub in, one at a time, until you get the error.
    At least you will know where the problem code is...


    Author Comment

    In addition to compacting and repairing the db (.accdb), updating my Windows and installing Office service pak 1 I did try importing the tables, queries and form (including the subs) into a clean db and the problem persist.  I tried opening the DB (.accdb) and adding additional script on another computer with office 2010 installed and got the same problem. I may try uninstalling and reinstalling the office suite and see if that fixes.  Thanks.

    LVL 74

    Expert Comment

    by:Jeffrey Coachman
    If it is the code that is the issue, then importing faulty code into a new database will yield the same issue.

    This is why I suggested NOT importing the code.
    Then adding in one sub at at a time until the issue appears.
    LVL 84
    You might also try performing maintenance on the database, as this can often pinpoint where the problem is.

    First, make a backup, then do this:

    1. Compact the db
    2. Compile the db -- from the VBA Editor click Debug - Compile. Fix any errors, and continue doing this until the menuitem is disabled
    3. Compact again

    Now move everything into a new, blank container. As Jeff indicates, if you have a problem with a particular piece of code, then do NOT move that into your new db.

    Now try running the db. If it works, then import the last piece of code. If that causes the new db to fail, then you've found the culprit - you'll have to recreate that bit of code manually.

    Also, sometimes a Decompile may help. You do this BEFORE the 3 steps above:

    Build a shortcut with this as the target:

    "full path to msaccess.exe" "full path to your db" /decompile

    Run this shortcut, the perform the 3 steps + import again.

    Accepted Solution

    Ok. I resolved the problem thanks to all of the above "process of eliminations".  It was to many lines of script in the module.

    The limit I was running into is 65535 lines of code in 1 module.
    I was able to create a workaround where I moved some of the code into a new module.  This allowed the new code to paste in without Access crashing.

    Code Limitations

    Thank you all for the support.

    Author Closing Comment

    My solution was the actual solution.  But I appreciate all the support that help me get to it.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    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…
    Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
    In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
    The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

    761 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

    8 Experts available now in Live!

    Get 1:1 Help Now