"there isn't enough memory to perform this operation"

To continue on from the last thread the syntax is slighlty out. To save a form as a text file you need

Code:
Application.SaveAsText acForm, "YourFormNameHere", "C:\Path\Filename.txt"
Then to retrieve the form use

Code:
Application.LoadFromText acForm, "NewFormNameHere", "C:\Path\Filename.txt"
Remember to delete the offending form name before loading the new one from text. It is also worthwhile performing a compact and repair, then exiting Access. Re open the mdb and load the form from text file.

If you have to provide documentation for your application you can use this technique to create text files that contain all the information about your forms. Then should anyone modify your form at any point or it becomes corrupt you can restore it from the text file. You can be really clever and create a support database that would be similar to the MSysObjects table that contains a list of all your objects and store the contents of the text files into a memo field.

David

Thanks to both (Air_Cooled_Nut and David) of you. This helped me today!!!
 
Great tip - I have also encountered this problem and have used this tip to fix up the corrupted form. :)

I think that the tips regarding deleting a label associated with a text box might be right on the money as my problem was always associated with adding or copying a text box, moving it to the top of the form and deleting the label. I think that I'll be going through the save, close and reopen steps before deleting labels.
 
Thank you very much for this solution - truly a relief to have this path in a development on a database system where I've got this issue of corrupted forms. I never experienced this before and so great I finally found a way out.

Danny Puype
 
You guys are heaven sent. I thought I wouldn't be able to get out of this one. From now on, I'll backup my database more often!!
 
I have had some weird errors show up over the years. In most cases 'Compact and Repair" fixed every thing. Of course I always make a backup of the DB before I start the process.
 
Had this happen just this week.

I Opened the control panel and went into System, Advance, Performance Options and then selected "Let windows choose what's best for my computer" and now everything is working fine.
 
I too have encountered this error many times.

While I never was able to get back into a form once it was corrupted, there were a few tricks I learned:

1) Backup often

2) The VBA code for the corrupt form was still viewable, so I was able to copy and paste my latest code into the backup

3) When the 'there isn't enough memory to perform this operation' error occurs, immediately exit Access and DO NOT save any open forms. This way none of the open forms will be corrupted.
 
I've run onto this problem today, too, and don't think I've stamped it out. But perhaps one things is turning of Name AutoCorrect. I was working in a stripped-down sample database to try to isolate an error, and encountered the "isn't enough memory" error in the sample database, one that has never occurred in the source database (which is dramatically more complicated than the sample). But I realized I forgot to turn off Name Autocorrect after creating this new database, and now that I've turned it off, I haven't received the error.

That doesn't mean I've stamped it out, though, as I was getting it only after using it for a while. I'll post back if I encounter the error again.
 
I eventually determined today that the VBA project in my test database was corrupted, so I recreated from scratch, making sure I turned off Name AutoCorrect before I imported anything. I haven't had any issues since then. I suspect this error message is an early harbinger of VBA project corruption.
 
Wow!

I have the same problem... over and over again clicking that stupid "okay" button.

BUT. I finally got the dialogue box to go away and not immediately reappear. So I did a quick compact & repair. It prompted me to save which is where I thought it would error out again. But NO ERROR! It saved the form, compacted the database and reopened the file. It reopened with another error but I clicked through it.

I compacted again and it's working just fine now. Just FYI.
 
I had this same problem. When I was trying to figure out what was going wrong, I noticed under Tools>Database Utilities>Convert Database that my database was currently in the Access 2000 format (no idea why, because I built it in 2003), so I converted it to the 2002-2003 format and when I opened the file in the new format the form opened with no problems.
 

Users who are viewing this thread

Back
Top Bottom