Microsoft Access closing after problem encountered

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

Guest

I am starting to frequently get the message that "Microsoft Assess has
encountered a problem and needs to close."

What could cause this? I have compacted and repaired mdb. and I still have
this message occurring.

Anyone else have this problem?
 
Hi Franky,

It sound's like your database has started to become corrupt. The first thing
I would do is create a new database, and import all objects from the suspect
database into the new database. Here are the steps:

1.) Create a new blank database.

2a.) Import all non-linked tables. Do not import linked tables. Make sure to
click on the Options button and include Relationships, Toolbars and
Import/Export Specs.

b.) Import all queries
c.) Import all forms
d.) Import all reports
e.) Import all macros
f.) Import all Data Access Pages (if you have any)
g.) Import all modules

While Access will allow you to import all objects in one operation, this is
not the recommended procedure. The experts at FMS Inc. have posted advice, in
their newsgroups, that this is best done one object group at a time. It
doesn't add that much extra time to do it this way. See the post by Troy:
http://www.fmsinc.com/ubb/Forum12/HTML/000285.html

3.) Re-create any linked tables from scratch.

4.) Set the startup options to match those of the source database
(Tools > Startup). Startup options cannot be imported.

5.) Open the source database. Press Alt F11 to open the VBE (Visual Basic
editor). Click on Tools > References. Make a note of which references are
present, and the order in which they appear. Open the new database, press Alt
F11 and click on Tools > References. Set the same references in the same
order. Click on the OK button to dismiss the references dialog.

Note: Reference priority problems, and a solution to them, are discussed in
greater detail here:

ADO and DAO Library References in Access Databases
http://www.access.qbuilt.com/html/gem_tips1.html

6.) In the VBE editor, click on Debug > Compile {DatabaseName}. Make sure
that any code compiles properly without errors.

If you continue to see signs that point to possible corruption, start
investigating the information shown in these links:

Preventing corruption (Allen Browne) http://allenbrowne.com/ser-25.html

Recovering from corruption (Allen Browne) http://allenbrowne.com/ser-47.html

Are you up-to-date with all service packs for Windows, Office and the JET
database engine?
How to keep a Jet 4.0 database in top working condition (Microsoft KB article)
http://support.microsoft.com/?id=303528

Do you have the very buggy Name Autocorrect feature (Tools > Options... |
General Tab) disabled? Is this a mult-user database? If so, have you split
it into a front-end (FE) and back-end (BE) databases? The FE database
includes all queries, forms, reports, macros, modules and DAP's. It may also
include local tables for storing data that is not shared. The BE database
includes tables only that contain the shared data. Each user should have a
copy of the FE database installed on their local hard drive. The BE database
is saved to a folder on the file server.

Corrupt Microsoft Access MDBs FAQ (Tony Toews)
http://www.granite.ab.ca/access/corruptmdbs.htm


Good Luck!

Tom
__________________________________________

:

I am starting to frequently get the message that "Microsoft Assess has
encountered a problem and needs to close."

What could cause this? I have compacted and repaired mdb. and I still have
this message occurring.

Anyone else have this problem?
 
Hi Tom. I was about to post this exact same problem and it is driving me
nuts. I did what you are advising years ago in Access97. I shall follow your
steps. Thanks
CurtainMary
 
Please let me know if it helps.

Also worth checking out:

How to keep a Jet 4.0 database in top working condition
http://support.microsoft.com/?id=303528

Make sure to follow these three links, as a minimum:
Verify that the latest operating system service pack is installed
Verify that the latest Microsoft Jet service pack is installed
Verify that the latest service pack for your version of Office is
installed


Good Luck!

Tom Wickerath
Microsoft Access MVP

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
 
Tom, I had a go (twice) firstly after importing queries the resultant db
window minimised (not after tables). After all your steps, there is a problem
with the references.
1st Visual Basic for Applications is same,
2nd Microsoft Access 11.0 Object Library is same,
3rd OLE Automation is same,
4th Microsoft ActiveX Data Object 2.1 Library is not same, new db has
Microsoft DAO 3.6 Object Library.
5th new db has Microsoft ActiveX Data Oject 2.5 Library -
old db has :-) Videosoft vsView3 Controls which is not in the list for the
new db
I tried to bring up the 2.1 Lib but message told me not allowed

Also my main form (in two parts page1 and page2) is all wrong in colour and
in design mode lost its grid.

Other than that it appears to work.
CurtainMary
 
Hi CurtainMary,
4th Microsoft ActiveX Data Object 2.1 Library is not same, new db has
Microsoft DAO 3.6 Object Library.

That's fine. Access 2003 restored the DAO Object Library as a default in all
new databases. To the disdain of many Access users, Access 2000 and 2002 did
not include a reference to this library, by default.

The order of your DAO and ADO library references may produce a future
run-time error 13: Type Mismatch, which you should be aware of, and take the
steps to fix now, if you have not already done so. The code will compile
fine...it's a possible run-time error that is potentially waiting to bite
you. Here is some background information on the problem:

ADO and DAO Library References in Access Databases
http://www.access.qbuilt.com/html/ado_and_dao.html

5th new db has Microsoft ActiveX Data Oject 2.5 Library -

This is a reference to the ADO library. Access 2003 defaults to version 2.5.
Access 2002 defaulted to version 2.1, I believe. Should not be a problem.
However, you are not using any functionality that requires the later version,
then you might want to substitute version 2.1 in it's place. Version 2.1 is
more widely distributed to other computers. If you retain the reference to
the 2.5 version, you may find that a given PC requires the MDAC (Microsoft
Data Access Components) upgraded, whereas, perhaps no update might be
required if you just have the 2.1 version selected.
old db has :-) Videosoft vsView3 Controls which is not in the list for the
new db

This very likely could be a reference that was included, but was not needed.
If the code compiles without an error (Debug > Compile ProjectName) then you
did not need the reference at all. I recommend removing ALL references that
are not required. Having extra references reduces RAM memory available for
other tasks, and just increases the chances of encountering a missing
reference error when the database is moved to another PC. Here is more
information on missing references:

Solving Problems with Library References (Allen Browne)
http://allenbrowne.com/ser-38.html

Access Reference Problems (Doug Steele)
http://www.accessmvp.com/djsteele/AccessReferenceErrors.html

It is not uncommon to see lots of old references in databases. A reference
can be automatically added to a database when one is in design mode and drops
an ActiveX control onto a form or report. Later on, the developer deletes the
control (or the form/report that contained it). Guess what does not get
automatically deleted.....the reference that was added automatically for you.

I tried to bring up the 2.1 Lib but message told me not allowed
Deselect the 2.5 Lib first, then try selecting the 2.1 Lib. You cannot have
two versions of the ADO Object Library selected at the same time.
Also my main form (in two parts page1 and page2) is all wrong in colour
That sounds weird. This main form may be corrupted beyond repair. Can you
import a copy from a backup that you hopefully have available?
and in design mode lost its grid.
Verify that grids are turned on. Open any code module. Click on Tools >
Options... Select the General Tab. Verify that you have a check in the option
that reads "Show Grid". While on the same tab, remove the two checks for
background compile and compile on demand. On the Editor tab, verify that
"Require Variable Declaration" is checked. Here is more information on this
topic:

Always Use Option Explicit
http://www.access.qbuilt.com/html/gem_tips.html#VBEOptions


Tom Wickerath
Microsoft Access MVP

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
 
Access 2003 defaults to version 2.5.

This is true only if you create a new database using the Access 2002 - 2003
format with Access 2003. If your default format is the Access 2000 file
format, then Access 2003 defaults to version 2.1.

Reference: http://support.microsoft.com/kb/825796/

Personally, I recommend doing your development work in the Access 2000 file
format, unless you have a specific need for functionality that is only
supported using the 2002-2003 file format. The following KB article provides
the reason that I make this statement:

Database bloat is not stopped by compacting database with Access 2002
format
http://support.microsoft.com/?id=810415


Tom Wickerath
Microsoft Access MVP

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
 
Thanks Tom for taking the time. It is late and I shall work on it tomorrow.
One thing though, I was able to find all the same references used in the old
and I updated the new but that didn't include the DAO 3.6 Object Library,
should I add that back and if so at what position?
Thanks again for helping
CurtainMary
 
Hi CurtainMary,
but that didn't include the DAO 3.6 Object Library, should I add that back ...
Only if it is truly needed. Try compiling your code using:

Debug | Compile ProjectName

where ProjectName is the name of your project. Assuming your code compiles
without any errors (hopefully it does), then try removing checked references,
one at a time. It is helpful to either write them down, or create a quick
image of the existing checked references. Repeat the compile operation each
time you remove a reference. If you all of a sudden produce a compile error,
then you definately need the last reference that was removed.
... and if so at what position?
You should not need to concern yourself with the order (priority) of
references *if* you properly disambiguate your code. Most code that was
created in Access 97 and earlier versions is not disambiguated. Please refer
to this article for a more in-depth discussion on this topic:

ADO and DAO Library References in Access Databases
http://www.access.qbuilt.com/html/ado_and_dao.html


Tom Wickerath
Microsoft Access MVP

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
 
Hello again Tom. Thanks for coming back. I always compile after any changes
in the VBA programming. Followed your suggestion about the references.
Everything seems to work fine. Even switching between old and new dbs
produced no errors which was one of the problems. I am now left with one
little annoyance, my main view/data entry form using Tab control two pages, i
cannot change the colour. After the excercise the colour came back very
wishy-washy and using the properties it just refuses to change. The
background on which the tab pages sit changes colour ok. Perhaps its 2003, I
also noticed the buttons are now rounded at the corners.
CurtainMary
 
... and using the properties it just refuses to change.
You should be able to set a property and have it stick in most cases. The
only thing I can suggest is that this particular form may have some
corruption. Can you import a copy of this form from a previously backed up
copy of your database? If not, you might try using the undocumented
SaveAsText / LoadFromText to see if that will help.
Perhaps its 2003, I also noticed the buttons are now rounded at the corners.
You've got Themes enabled. Click on Tools > Options... Select the
Forms/Reports tab. In the lower left corner, you should see an option that
reads "Use Windows Themed Controls on Forms". Deselect this option if you
want to return to a more classic look.

The themed look of forms and reports can be turned on or off (WindowsXP or
later) using the Display applet in Control Panel. Change the theme from
WindowsXP to Windows Classic if you prefer the more classic look, as I do.
I'm really not a fan of the new themed appearance.


Tom Wickerath
Microsoft Access MVP

http://www.access.qbuilt.com/html/expert_contributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________
 
Hi Tom, Eureka ! Taking the windows themes off gave me back the colour too!
Just as well I mentioned the rounded buttons!
(I had already tried to import another copy of the form-didn't fix) Thanks
very much !
CurtainMary
 

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