Question Access Crashing

AdamFeerst

Registered User.
Local time
Yesterday, 17:20
Joined
Sep 21, 2015
Messages
63
Access is crashing repeatedly. It happens on one, and only one form (as far as I can tell), whenever I try to open it in form view, save design changes, or copy the form. When it crashes, I get Microsoft Access has stopped working, then either that it has to Reststart or Close the program.

I have an Access2013 FE, with a SQL BE. I set it up so that some of the BE tables are copied to the FE on load. This makes This makes running repeated form searches, reports, etc., much faster for users at remote locations.

On a learning curve, I'm reducing the number of mirrored tables and plan to run pass-through queries and stored procedures where practical. In doing so, I first created a copy of the FE to play with. I deleted the FE mirrors. I renamed the linked BE tables to what the FE tables were so that I don't have to rewrite a bunch of code and queries. Something in this process is corrupting this one form.

I've tried several things to fix the form with no luck:

  • Deleting the form and then importing from the original FE, where it runs fine.
  • Creating a new, blank form, and copying the form elements over.
  • Deleting, and then relinking the BE tables.
I have no idea what is causing this to happen, or to think of other things to try.
 
Sounds like a badly corrupted form. I presume you have done an "external" Compact/Repair (where you open Access first with no database, then select the Compact/Repair option and allow the dialog to ask you which database to C/R). Doing it that way assures a "good" copy of Access and doesn't require Access to initially look at the database properties such as "Opening Form" or permissions. That would reduce the likelihood of tripping over anything.

If that fails, given what else you have done, the best option might be to create a blank database and import stuff from the failing database one item at a time until something barfs - which, if you are lucky, won't happen. Typically, doing this fixes corrupted forms and other structurally damaged items.

If you have VBA in a class module on the form, you might be able to open it in Design View, set a few breakpoints on various events on the form (but don't actually CHANGE anything), and then switch to Form View. You can do that without saving the form first, so perhaps that won't crash you.
 
Let me add that the code compiles
 
The external C/R seemed to work. It let me open the form in view mode, go to design, then make and save changes. However, it crashed the next time I tried to open it. I even tried removing all the VBA code from the form.

If I went the blank database route, there are a lot of linked tables, queries, forms, reports, and modules to import. Any idea where I should focus my search rather than one-by-one on everything?
 
Focus on whatever it takes to activate your miscreant form first. If you isolate its components and copy to a virgin database container, you can determine its behavior in that context - kind of like what high-security sites call a "sandbox" - and see if the problem persists. If it is fixed, continue importing the other things you need.

Fortunately, the IMPORT dialog allows you to import a bunch of stuff at once.
 
If you are using Error trapping in VBA try taking it out and let if fall over.

Or monitor the VBA and see where it breaks.

Simon
 
I have had this sort of issue occasionally

It might be worth creating a new form, and copy everything from the old from to the new one.

When you think about it, what appears to be a set of tables and indexes, forms and queries, etc is somehow all managed within a single monolithic file. I imagine all it needs is one pointer somewhere to get confused, and things start to go wrong.

I find that corruption seems to occur when I start copying labels, or controls without labels within an already complex form. I sometimes find myself making a few changes and saving a progress version of my form, to avoid having to redo everything.
 

Users who are viewing this thread

Back
Top Bottom