This is a wonderful article I found at www.unsoftwareag.com:
ACCESS ONLINE ENCYCLOPEDIA Article Code: G3
Why insufficient memory ?
You can have installed lots of RAM (128 MB and more) on your machine but nethertheless ACCESS crashed after a short period of time indicating that you do not have enough memory to display something. This problem is very frequent during the development phase as you often have to change into design view of forms, reports and modules.
In general you need to reboot your computer to be able to continue. Upgrading your RAM to 256 MB (and more) does not help.
If you check the "Free ressources" window (Windows System or ACCESS Information window) you see between 5 % and 50 % .
Sometimes you will see a system alert with "Memory Running Low" before the crash.
This crash happens on different computers at different times: On Computer 1 ACCESS will crash as soon as the ressources drop under 50%, whereas Computer B will work with less than 10%.
Explanation Part 1
The RAM is divided in different areas that hold different system information. In the so-called GDI-HEAP information about the open windows are stored (Position, Status, Size, Handle...) The size of the GDI-HEAP is limited to 64kB - independantly from the total RAM installed on your machine. Once the GDI-HEAP is saturated the system (or certain programs) will crash.
Explanation Part 2
As soon as you close a window, the occupied area in the GDI-HEAP should be released. Unfortunately, this does not work properly with ACCESS neither on closing a single database object (Form, Report, Module...) nor on closing ACCESS.
Explanation Part 3
As soon as you ope any VBA module (globales or Form/Report class module) all modules of the application are opened, each in a single window. In any medium sized application it can easily happen that 100 windows are opened instantly. This moment leads quite often to a crash because the GDI HEAP is saturated.
There are several workarounds, you should opt for a combination:
Limit the number of forms, reports and modules.
Delete all unused database objects
Limit the number of background graphics and tab controls
Distribute your database objects on different libraries
Recreate your database file regularly and import the objects
Activate the VB password and only one module window will be opened at a time
(ATTENTION: removing the VB password again might become difficult).
Do not close forms that you permanently need but make them invisible. See Article F46 for details.