Access Has encountered an error and must close

L

Luke Bailey

Hello,

I have several Access databases that run a Windows Scheduler at various
times through the night that run some updates for me. Basically, they all
work the same - and AutoExec macro runs, opening a form which has OnOpen
Event that starts running code doing various items (running queries, copying
tables, etc.) - then the last command is always a docmd.quit. Each DB has a
"compact on close" to minimize size. For a long time the databases all
worked fine, but now when I arrive in the morning and check the computer
running the updates, there are several databases with the error "Microsoft
Access has encounted and error and must close..." which asks I want to report
to microsoft.

The following info is in the content of the message to go to microsoft.
It's always basically the same. Always has the dll - vb6.dll

AppName: msaccess.exe AppVer: 11.0.6566.0 AppStamp:42cdb33e
ModName: vbe6.dll ModVer: 6.4.99.72 ModStamp:40b29ba6
fDebug: 0 Offset: 000fc0d6


Any ideas what would cause this? I don't think it happens everyday with the
same databases - I think it's hit and miss.
 
R

Robert Morley

One of the most common causes of Access crashes is corruption in the compiled code. Try decompiling each of the affected databases
and see if it helps. To do so, click on Start, Run, then type in:

"<full path to Access>\MSAccess.exe" "<full path to your database>" /decompile


Rob
 
L

Luke Bailey

Thank you Robert!
I actually did run a decompile on one of the DB's yesterday that simply
would NOT run the code anymore (crashed everytime the database was open).
This did fix the problem on that DB.

Could this cause a "hit and miss problem"? Some of the DB's run fine one
day and run into the error the next.
 
R

Robert Morley

It's less common, but yes, I've seen hit-and-miss scenarios with compilation problems before.

If you're getting hit-and-miss problems, though, I'd look more into unexpected environment changes like drives being full (or worse,
flakey), network resources being temporarily unavailable, other users having your data/database unexpectedly locked at the
time...that sort of thing. In an ideal world, most of these *should* cause standard errors rather than crashes...but it's not an
ideal world. :)

But try the decompile first, as it certainly can't hurt. Also, once you've decompiled each of them, try a Compact and Repair on all
of them, just to be on the safe side.



Rob
 
L

Larry Wright

I have had the very same error which doesn't happen every day and didn't
happen for a long time after the application was written. The only problem
with your solution in my case is that none of the code in my databases is
compiled.

I am doing a lot of text file importing and Excel file exporting using
simple queries and calling them using a shortcut to a macro, which then calls
the module code when needed.

I have tried rewriting the code in a different way but the error still shows
up. I have even completely rebuilt the databases and code in a new database
file but with the same result.

The only other thing I have noticed is that in many cases there will be a
..ldb file in the directory with the database which can't be deleted. Using
another piece of Access code I can see that the only user in the database is
the system itself and me running the code to show me who is accessing the
file.

This is really annoying when you have 40 or 50 databases doing these types
of tasks at all times during the day crashing and pulling down the entire
system.

The system this is running on is a Windows 2000 Server with Office 2003 and
nobody touches the system except to monitor it and correct these problems.

If anyone has any ideas, I will try almost anything.

Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top