Access crashing when entering design mode

W

Wayne

Hi,

I'm having trouble with a few access databases. They are Access 2000 DB's
running in Access 2002 SP2. The problem only happens from time to time, but
seems to be happening across a few databases once a month or so.

When opening or entering design mode on a form, I receive the standard
"Microsoft Access has encountered an error and needs to close error". This
only happens when special keys are enabled, and the database is loaded with
the Shift Key depressed to override this. When the database is loaded as
normal (i.e. special keys disabled) the form loads fine.

There's a workaround - just create a new .mdb file and import all the
objects from the file with the error. This seems to suggest a corrupt
database, but unfortunately the problem re-occurs in the new database after a
period of time.

I've checked if its an Access installation issue and it doesnt seem to be,
and the fact that I can find a workaround suggests its an issue with the
file.

Does anybody know the potential cause of this, how I can prevent it, and how
I can fix it when it occurs?

Thanks,
Wayne
 
A

Allen Browne

Hi Wayne

Yes, it's probably a corruption, but there's several possible causes.

First thing is to uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Explanation of why:
http://members.iinet.net.au/~allenbrowne/bug-03.html
Then compact to get completely rid of this stuff:
Tools | Database Utilities | Compact

Next thing is to decompile a copy of the database by entering something like
this at the command prompt while Access is not running. It is all one line,
and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"
Then compact again.

Does this form have any subforms? If so, make sure that you have a text box
on the subform for the foreign key field, i.e. the one named in the
LinkChildFields property of the subform control. There's a nasty bug in
A2002/2003 where it can begin crashing if the LinkChildFields refers to an
object of type AccessField, and you can work around the bug by placing a
text box on the form, so the reference is to a control instead.

Next, is anyone opening the database in Access 2000 as well? The binary
(compiled code) in A2000 is different, so this will cause the project to
compile different versions of the binary, and contributes to the corruption.
In general, a decompile is in order before switching versions.

And finally, are you editing the code of your forms in break mode? (i.e
while the form is open, not in design view? Under certain conditions, this
can also corrupt the project.

For other general suggestions, see:
Preventing Corruption
at:
http://members.iinet.net.au/~allenbrowne/ser-25.html

BTW, you mentioned SP2 for Office XP, but do you also have SP8 for JET 4?
Very important, and available from the Downloads section at
support.microsoft.com
 
Top