Solved

Ms Access Form won't open

Posted on 2006-11-18
6
3,382 Views
Last Modified: 2008-06-02
I had a msgbox pop up and tell me there wasn't enough memory to save.  Please close some other applications then resave.

So i did this, but now i have a form that will not open it design or in normal mode. I can access the code module. but i can't get the form to  open.  

I really don't want to start from stratch with a new form.

Does anyone have any ideas.

I compacted and repaired the db as well. No luck though

i also restarted laptop.

0
Comment
Question by:j_Bryan
  • 2
6 Comments
 
LVL 58

Accepted Solution

by:
harfang earned 168 total points
ID: 17972902
Hello j_Bryan

I'm afraid this is a symptom of database corruption. This occurs frequently when you are editing the code module of an open form. We all do it, naturally, because it's so convenient, but sometimes VBA gets confused in its dozen of compilation levels of a module and saves the wrong one.

At that point, the form is no longer accessible by any normal means (opening, copying from another database, etc.) and often cannot even be deleted. In those cases, I create a new blank database, import all surviving objects from the corrupted database, and import the victims from my last backup. I do an hourly backup when designing for that exact reason.

There might be companies who will claim to retrieve portions from such a corrupted database, but I never took the trouble and -- sometimes -- had to start from scratch.

Sorry for the bad news.

Last thing to try (very little hope): decompile your DB:

    "<path to access>" /decompile "<path to your db>"

Cheers!
(°v°)
0
 
LVL 58

Expert Comment

by:harfang
ID: 17972911
Wait, if you can still see the module, at least copy-paste that to a text file. You can also try (again, very little hope) from the VB immediate pane:

    SaveToText acForm, "frmBuggyForm", "C:\buggyform.txt"

And then, in a new blank database:

    LoadFromText acForm, "frmRetrieved", "C\buggyform.txt"

(°v°)
0
 
LVL 20

Assisted Solution

by:clarkscott
clarkscott earned 166 total points
ID: 17974117
Try creating a new mdb and import it.  Sometimes this works.
Actually, I just had a form crash on me.  I did this procedure and all was fine.  I simply deleted the original (bad) mdb and renamed the new one.

Saved me about 2 hours of work.

Scott C
0
 
LVL 44

Assisted Solution

by:Leigh Purvis
Leigh Purvis earned 166 total points
ID: 17977903
Incidentally - what version of Access are you using?
I ask because this behaviour used to be much more common back in Access 2000.  (It's early days - before the SP rescuers).

If it is A2K make sure you're Service Packed all the way.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question