Corrupt Form - very complicated form - how to recreate.

T

ThomasAJ

Office 2003 on Vista now - was Office on XP previously.

On XP this form has been giving problems for a few years whereby sometimes
after some changes and a save it gets corrupted. I restore it from backup -
do a similar but slightly different change - save it (with fingers crossed) -
and it is OK.

So now the app is on Vista and even after *no change* Office will not even
save it when I hit the save icon. I get a few different messages like not
enough memory or windows is trying to find a solution... This is the same for
ALL the generational backups I have going back weeks.

I need to recreate it from scratch but it is a very complicated form - yes I
have access to the code and can copy and paste controls to a blank form as a
possible method but...

Is there a product on the market that will 'read' the design and possibly
'write' it to a 'blank form'? Or any other ideas welcome. Surely the 'layout'
and control properties etc are in a text format but 'hidden'. VB had
everything accessible in text.

To recreate it from the beginning is a monumental task.
 
D

Douglas J. Steele

There are hidden (and undocumented) methods of the Access Application called
SaveAsText and LoadAsText that you can try.

I talked about them in my February, 2005 "Access Answers" column in Pinnacle
Publication's "Smart Access". You can download the column (and sample
database) for free at http://www.accessmvp.com/djsteele/SmartAccess.html
 
J

John W. Vinson

Is there a product on the market that will 'read' the design and possibly
'write' it to a 'blank form'? Or any other ideas welcome. Surely the 'layout'
and control properties etc are in a text format but 'hidden'. VB had
everything accessible in text.

Access does too... though it's pretty much undocumented. Make a backup of
course; then... Open the Immediate window with Ctrl-G and type

Application.SaveAsText acForm, "MyFormName", "C:\SomePath\MyFormName.txt"

Delete the form. Compact and repair the database to clean out any rubbish; it
probably would help to decompile and compact again. Then again in the
immediate window do

Application.LoadFromText acForm, "MyFormName", "C:\SomePath\MyFormName.txt"

Compile, compact again, and see if it gets a bit more stable.

See

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

for a detailed discussion of this and other types of corruption.
 

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