Access encountered a problem and needs to close

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a user that is receiving the subject error when he opens a module and
then closes his database (it compacts upon closing). If he doesn't open a
module, and then closes the database, it's fine. Any suggestions as to what
would be causing this?
 
I have a user that is receiving the subject error when he opens a module and
then closes his database (it compacts upon closing). If he doesn't open a
module, and then closes the database, it's fine. Any suggestions as to what
would be causing this?

Sounds like that module is corrupted.
Make a copy of the database and try the following steps on the copy.

1) Turn off the option to compile on save or demand
2) Open the module and save/export it as a text file (not a bas if you
have that option).
3) Delete the module.
4) Open a different module and 'Compile All Modules'
5) Compact and repair - deal with any errors hat it encounters.
6) Open the database again and create a new module (same type as the
deleted one)
7) Open the text file and copy/paste the code that was exported into
the new module.
8) If you can afford to give the module a different name, I would,
otherwise give it the old name.
9) Save module, Compile All Modules
10) Retry the steps that caused the error message in the first place.

See if these steps work.
 
Sounds like a corruption issue. If the user opens up another module then does
a compile, what happens? BTW: What is a user doing opening up a module anyway?

There's a good chance that a decompile and recompile might fix it. Check out
the following resources for corruption information including decompiling.

Tony Toews has an excellent web page on database corruption.
http://www.granite.ab.ca/access/corruptmdbs.htm

Allen Brown also has excellent info on corruption.
http://allenbrowne.com/ser-47.html

I have a white paper in a Word document named Fix Corrupt Access Database
towards the bottom this page:
http://www.rogersaccesslibrary.com/OtherLibraries.asp
 
Here are the user's responses to your first and second responses:

1. No help. This is the usual trivia that I had already tried. I can
delete the last module I created and the “Microsoft Office Access has
encountered a proble…†doesn’t occur. As soon as I create a new module, any
new module even with just 2 lines sub and end sub coding and even adjusting
so it gets a different default name, I get the message again.

2. I tried a version of the data base that I had backed up from last
august, long before I had any problem. The same thing happens. After
compacting, I get “Microsoft Office Access has encountered..†This is very
strange. I know it is a problem with the data base, but is their something
different about the system that is causing it to start happening now?
 

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

Back
Top