There isn't enough memory - Form Design

gray

Registered User.
Local time
Today, 10:22
Joined
Mar 19, 2007
Messages
578
Hi All

Windows XPProm SP2
Access 2002 SP3

I have hit a really tricky problem. I've spent hours getting a bespoke Form to work (all my own add, cancel,save,edit buttons, etc). I have saved my work regularly. The thing was working perfectly when I decied to move a label, yes a label, from the header to the footer of the form... drag and dropped it. The label caption is altered at various stages by my code.

Now I can't get in to the form.. I get "There isn't enough memory to perform this operation". Not even into design mode so I can't delete/replace the label. I am stunned! Even though I saved all my code I never dreamt I wouldn't be able to start the thing!

I think there is a way to edit forms "manually"... e.g. through some text files?

Does anyone know if that's possible...

Thanks
 
Hello

i've just had the same problem.

i added a subform and now i can't get back in. before i start the painful process of rebuilding the form could you tell me if you solved the issue and if so how?
 
All the more reason to also backup your project on a regular basis. I have personally come across this problem many times while working with OfficeXP Access and have never found a solution to it. When the Form is corrupt....it's corrupt. I have however, managed most times to retrieve the code from within the Forms' code module through the VBA IDE.

Whether it's big or small, I backup my projects regularly, daily and even sometimes hourly. It has proven to be an invaluable practice.

.
 
As posted earlier, if the form is corrupt, it is corrupt. But on the outside chance that it is something else, your error: "Not enough memory" tells me at least something else than the KB article.

Your machine needs to have enough memory to do its job. Memory is consumed by things that are too big, or by having too many things, for the memory resources you have set up.

You get more memory by:
(1) Buying / installing more RAM - addresses PHYSICAL memory
(2) Defrag your disk and then visit the Start >> Control Panel >> System icon to boost the amount of page file space you allow - addresses VIRTUAL memory
(3) In order to make headway with #2, if you have access to a disk cleanup utility (which you do from the device's Properties page), take out the trash.

You use less memory by:
(4) Compacting / repairing the DB
(5) Closing out things you don't need when working on Access projects.
(6) Sweeping through your code to assure parity of operation...

(Parity of Operation...?) That is, if you open it, close it. If you create it as a temporary thing, delete it when you are done. If you open something inside a loop, close it inside the same loop. If you are using external applications from VBA, release them when done.
 
I Managed to resolve this by opening it on a new laptop in the office then removing the new subform. once i changed that is was back to normal.

cheers

ES
 
Welcome to MY world. I run into this issue so frequently, I feel cursed. I have even worked with a Microsoft tech to try to track down the bug. It has occured for me in different versions of Access on at least four different PCs. Here is what I know:

If you have a compile error anywhere and you add a control to a form and then do anything to that control's label, this problem or worse can happen but you won't see it until you try to close and reopen the form. If you are lucky, you can fix the compile error and then export the form to text. You would then delete the version in the form and import the saved text version.

How I avoid the error if I need to remove or alter the position of an attached label:
1. Add a control.
2. Save and close the form.
3. Reopen the form and remove or move the label.
4. Save and close the form.
5. Reopen and continue.

Change the names and paths to export/import your form as text.
Code:
Public Sub ImportForm()
    Application.Application.LoadFromText acForm, "sfrmDocumentFields", "C:\Temp\Form_sfrmDocumentFields.txt"
End Sub
Public Sub ExportForm()
    Application.SaveAsText acForm, "sfrmDocumentFields", "C:\Temp\Form_sfrmDocumentFields.txt"
  End Sub
 

Users who are viewing this thread

Back
Top Bottom