Corrupt form not accessible

P

Pendragon

Access03/WinXP

I had two databases open - one for reference and the other to update a form.
After making several changes on the form, Access crashed on me. In
re-opening the database, I see the form I was working on in the forms list.
However, when I try to open the form in design view, nothing happens. I
tried to copy the form within the same database with a different name, and
nothing happens. I tried to export the form to a blank database, and I get
"No current record" for an error message.

Has the form been corrupted to the point of not being recoverable? Is it
unusual that the form name still appears in the list of forms? Any way to
get back into design view of the form and save its elements (I have a few
hours work invested in it)?

btw, this is not the first time that Access has crashed on me while doing
form design changes. Very annoying. I shouldn't have to File-Save after
every second or third modification, but apparently that is what it has come
to. Any ideas?

Thanks as always.
 
C

Cheese_whiz

I assume you tried compact and repair?

Do you have a backup copy of the database (you should....more than one imo).
If so, you can delete the form and then import it from the backup copy
(though, you will have to start your latest changes over).

Just some thoughts,
CW
 
P

Pendragon

Yes, did the compact & repair. I have multiple back-up copies from which I
could retrieve the original form; I was hoping to avoid repeating my morning
session of programming.

I'm more curious why Access crashes fairly consistently when a form is
heavily edited/modified and why the corrupt form continues to appear in the
form list yet cannot be accessed. Being able to get at my edits is a nice
bonus, but I'm pretty much resigned to the fact this morning's efforts are
lost.
 
R

Roger Converse

Have you added any new code that is somewhat complex? I know that about a
year ago, I was having a similar issue and it was becuse I wasn't updated
with the latest patch that caught this error when running. Prior to that, my
DB just kept crashing and I had no idea why. My code was all messed up, but
somehow compiled. It was very frustrating. So if you have done anything
new, then you may want to revisit what you did.

Sorry I can't help.

Roger
 
J

John W. Vinson

Yes, did the compact & repair. I have multiple back-up copies from which I
could retrieve the original form; I was hoping to avoid repeating my morning
session of programming.

I'm more curious why Access crashes fairly consistently when a form is
heavily edited/modified and why the corrupt form continues to appear in the
form list yet cannot be accessed. Being able to get at my edits is a nice
bonus, but I'm pretty much resigned to the fact this morning's efforts are
lost.

I've gotten in the habit (reinforced by many messages like this, and the
experience of other MVP's) of FREQUENTLY - every few lines of code, certainly
every time I "finish" with a Sub or Function - compiling and saving. I've even
pulled the Compile Project button onto the VBA editor toolbar so I don't have
to mess with Debug... Compile.

I also Compact and Repair after every couple of hours' work. And... of
course... keep good backups!

John W. Vinson [MVP]
 
T

Tony Toews [MVP]

Cheese_whiz said:
I assume you tried compact and repair?

Compacts don't actually do much if anything for objects other than
tables and indexes. Importing would work much better.
Do you have a backup copy of the database (you should....more than one imo).

I do a copy and paste from within Windows Explorer every few hours.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 
T

Tony Toews [MVP]

Pendragon said:
I had two databases open - one for reference and the other to update a form.
After making several changes on the form, Access crashed on me. In
re-opening the database, I see the form I was working on in the forms list.
However, when I try to open the form in design view, nothing happens. I
tried to copy the form within the same database with a different name, and
nothing happens. I tried to export the form to a blank database, and I get
"No current record" for an error message.

Try importing that form into a new MDB rather than exporting.

Also try decompiling. Decompile or how to reduce Microsoft Access
MDB/MDE size and decrease start-up times
http://www.granite.ab.ca/access/decompile.htm

Also try the SaveAsText.

Corrupt Objects within a Corrupt Microsoft Access MDB
http://www.granite.ab.ca/access/corruption/corruptobjects.htm

The little documented SaveAsText and LoadFromText may help if an
object is corrupted or otherwise behaving weirdly.
At the debug/immediate window type:
Application.SaveAsText acForm,"MyForm","c:\form.txt
You can load the file into a new MDB.
Application.LoadFromText acForm,"MyForm","c:\from.txt"

Sample code at http://www.datastrat.com/Code/DocDatabase.txt for
saving all objects in an MDB.
Has the form been corrupted to the point of not being recoverable?

Quite possibly. I have this happen to me as well.
Is it
unusual that the form name still appears in the list of forms?

No, quite typical actually.
I shouldn't have to File-Save after
every second or third modification, but apparently that is what it has come
to.

As John Vinson states I do that very frequently as well as compiling
the code every few lines.

And I don't compile or save while code is in debug mode.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top