Form corruption. Why?

mafhobb

Registered User.
Local time
Today, 11:00
Joined
Feb 28, 2006
Messages
1,249
I am in the process of designing a small(1.9Mb) database which so far is working well except for one thing.

There is one form with three tabs which works absolutely fine until I add a textbox in the 3rd tab. Once I do that, the form gets corrupted and I can't open it anymore (Error 2004, there isn't enough memory to perform this operation...)

This form contains a total of about 15 fields and controls, so it's not like I am asking too much to the system when loading it.

Because this has happened a few times with this particular form, I've had to go back to an earlier version of the form and import into the database and then basically every time I make a single change to it, I save the database and then perform a "compact and repair". Even when doing this, the minute I add a text box in that form, the form stops working.

Why would this be?

How can I avoid this problem? I do need to add this field to this form...

How can I "uncorrupt" this form?

Thanks

mafhobb
 
I have tried to redo the form based on an earlier version and I kept having the same problem.

Following another thread in this forum, I exported the earlier form as a text document trough the immediate window and then imported it right back in. I have now been able to modify my form as needed without any problems.

See thread below:
Here is another test you can to see if you can recover the form

Go into the immediate window (Ctrl+G)

Enter the following line of code

Code:
Application.SaveAsText acForm, "YourFormName" ,"C:\Temp\YourFormName.Txt"

then press return

Rename or delete the offending form

Next return to the immediate window and enter the following code

Code:
Application.LoadFromText acForm,"NewFormName","C:\Temp\YourFormName.txt"

Now se if you can design your new form
If not you can edit the txt file and check to see if there is anything unnatural going on.


David

Maybe my problem was already present in the earlier version of the form and the export/import process got rid of it.

For those who may have the same problem....give this a try.

Thanks Dcrake

mafhobb
 
its strange isnt it

In the contacts app, dowmnloaded from the MS templates, I get a similar problem with the main form. virtually any change I make to it renders it unuseable. I find myself saving versions of thisc form, before and after changes to make sure I can continure to use it.

I had a slightly different problem the other day - a form unexpectedlu produced run time errors, when compiled as an mde.

DFenton suggested I decompile and that seemd to fix it.

So maybe that is useful as a general panacea for this sort of thing. decompile
 

Users who are viewing this thread

Back
Top Bottom