Go Back   Access World Forums > Microsoft Access Discussion > General

Thread Tools Rate Thread Display Modes
Old 08-22-2002, 03:37 PM   #1
Join Date: Jun 2002
Location: Washington, USA
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts

I am almost completely finished with my database, but I've been hit with an "Out of Memory" run-time error. The error occurs for only 1 report. I can do anything else in the db, except run this report.

I have tried all of the following:
1) Shut down and restarted computer.
2) Compacted & Repaired db: both front-end and back-end.
3) Ran the Analyze Performance for the report and the queries that run it.
4) Imported all tables, queries, forms, reports, modules, macros, menus, etc. into a blank database.

The fe db size before compacting was 26MB (little!!) and went down to 1.8MB. The be db size before compacting was 3.2MB and went down to 2.2MB. They are both located on the C:\ drive on my pc, not on a network. My HD capacity is 9.29GB, with 8.4GB still available. I have 128MB RAM, with 75% still available. File system and Virtual memory are both 32-bit.

ARGGGGG! This is driving me crazy! And, of course, this is the most important report to the user.

Help! Anyone....

sarahb845 is offline   Reply With Quote
Old 08-23-2002, 12:05 AM   #2
Senior Member
Join Date: Dec 2000
Location: Nederlands
Posts: 152
Thanks: 0
Thanked 0 Times in 0 Posts
List of solutions:

This is a wonderful article I found at www.unsoftwareag.com:


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.
ElsVanMiert is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

All times are GMT -8. The time now is 07:17 PM.

Microsoft Access Help
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post

Sponsored Links

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World