[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 748
  • Last Modified:

Access Has Stopped Working

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.
0
ilfocorp
Asked:
ilfocorp
  • 3
  • 2
  • 2
  • +2
5 Solutions
 
chubby_informerCommented:
uninstall office using

http://support.microsoft.com/kb/290301

reinstall
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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.
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
<<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.

Jim.
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
Jeffrey CoachmanCommented:
< 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...

JeffCoachman
0
 
ilfocorpAuthor Commented:
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.

ic
0
 
Jeffrey CoachmanCommented:
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.
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
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.
0
 
ilfocorpAuthor Commented:
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
http://msdn.microsoft.com/en-us/library/aa240819(VS.60).aspx

Thank you all for the support.
0
 
ilfocorpAuthor Commented:
My solution was the actual solution.  But I appreciate all the support that help me get to it.
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 3
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now