How to avoid Access crash

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

Guest

I noticed Access crashes in some situations. This has been happening for
about a month now and I sent the error reports regularly.
In the meantime I think I figured what goes wrong. One situation I
identified is the following:
If I declare a function in a module, as public, and then the same function
in a form, I get an error message; I delete the declaration in the form and
everything is fine. If I close Access and then open it again, Access crashes
and there is no way to delete the faulty declaration anymore.
Maybe this could be avoided if there were a way to access code written in
Access without launching the application. Is there a way to do that?
 
Ana,

Start by (backing up and) decompiling your database, so you remove all
compiled code form it. See how to do it in the following article by Tony
Toews:

http://www.granite.ab.ca/access/decompile.htm

After the decompile, you should be able to open the database without any
problem - just hold down the Shift key while it opens, to prevent any
startup code from running. Once opened, go to the VBA window and execute
menu item Debug > Compile <your database name>. This should identify and
highlight problems in your code. Repeat the debugging until all the code
is compiled without any problem found.

HTH,
Nikos
 
Back
Top