compact and repair

  • My Access FE database didn't used to do this, but now everytime I compact and repair the database the forms take an extremely long time to open.  To fix this, I have to open the forms in design view and close them.  This makes them open at a normal speed the next time I go to open them.  Has anyone experienced this problem before?  Any ideas as to what is causing this or how to fix it?

    Thanks.

  • Compact and Repair does not really help performance very much.  It primarily gets rid of dead space in your data tables, and fixes data inconsistencies.  It does not fix any code or object (form etc) problems, and does not clean out old versions of (defective) compiled code.  You need the decompile switch for that.  Even the decompile switch does not really solve most code and performance issues, though.  You really need to periodically reimport all of your code and objects into a new database to really clean it up.  Also, when you make an MDE or ADE, most of the problems are cleaned up for you.

    So, it does not surprise me that you are getting improvement after opening and closing your forms.  It is probably forcing a recompile of your forms code, and results in temporary performance improvement.  That's just one guess though.  There are other possibilities.  For example, if you don't use Option Explicit, you may be getting a lot of poorly compiled (late bound) code that may have compile problems at runtime.  Since all this stuff is undocumented, its very tough to figure out the cause.

     

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply