Question : Microsoft has encountered a problem and needs to close.

Does anyone have any idea what causes this very frustrating message. It drives me crazy and I have no idea how to fix it. Is there a pattern? Something to look for or check?

My app is using an image control but it's not doing anything strange. Most of the time it runs fine but every once in a while I get that error message where Access just tells me it's shutting down.

I've attached a word file with the image. Take a look.

Any insight in to all this?

Thanks.

Answer : Microsoft has encountered a problem and needs to close.

I would suspect a form corruption.  Going past step 7 will not help for this problem. I include the additional steps for your future reference.

Steps (approximately in order) to use to fix a corrupted Access database. (Test after each step.)

1) CREATE A BACKUP OF THE CORRUPT DATABASE. (Just in case)

2) Compact and repair

3) Use jetcomp.exe  http://support.microsoft.com/default.aspx?scid=kb;en-us;Q273956

4) decompile: in run: msaccess "dbPathName.mdb" /decompile
   Compact/repair:  in run: msaccess "dbPathName.mdb" /compact
   compile: in VB editor: debug> compile
   Compact/repair
   http://www.granite.ab.ca/access/decompile.htm

5) Use a backup (you have a lot of those -- yes?)

6) If you can identify one or a few forms or reports causing problems, copy the problem form/report from a backup.  Or create a new form/report and copy all the objects in the old form/report to the new one. Copy the code from the old form/report using the undocumented
    Application.SaveAsText acForm, FormName, "C:\" & FormName & ".txt"
then paste that from Notepad into the new form/report.  If a module, copy the code using SaveAsText, create a new module, paste the code into the new module.


7) Create a new database, use File> Get external data> Import to get all objects of the damaged database and set up the options again.

8) Try a recovery tool:
   www.officerecovery.com/access/index.htm
   www.mvps.org/access/tables/tbl0018.htm

9) Hire a company to repair the database  http://www.pksolutions.com/services.htm

Additional information:
How to Troubleshoot/Repair Damaged Jet 3.0 and Prior Databases
http://support.microsoft.com/support/kb/articles/Q109/9/53.asp

How to Troubleshoot Corruption in a Microsoft Access Database
http://support.microsoft.com/default.aspx?scid=kb;en-us;306204

Corrupt Microsoft Access MDBs FAQ
http://www.granite.ab.ca/access/corruptmdbs.htm
Random Solutions  
 
programming4us programming4us