Mwmory Usage / Garbage Collection

WilderLupo

New member
Local time
Today, 11:11
Joined
Nov 16, 2012
Messages
5
Hello,
I have build a database with which I can create quite a lot of reports.
When creating them I run out of memory with run time error "2004".
When investigating I detected that a lot of memory is used when creating the reports in PrintPreview mode. When closing the reports the memory is not automatically freed.

Is there a way to enforce garbage collection?
Local variables of called routines I set to Nothing.

Can anybody please give me a hint
 
G'd evening,
MS Access has no garbage collector, all what you (manually can do) is dispose your variables.
That being said. What is your Access Version? how much RAM do you have? how many reports do you build simultaneously? Without looking at your code is hard (or impossible) to say. But i think i would start by debugging the code to find out the heavier process and change it.
G'd luck
 
Hello Estuardo,
thank you very much for your quick answer.

I am working with Access 2007.
The RAM of the PC is 3,46 GB.
I am building as much as 17 reports simultaneously.

This count only refers to the main reports. My reports are a bit complex as nearly each report contains subreports, some of these even contain one more level of subreports. The number of subsubrepots resp. subreports depend on the contents of the database.

I have only one report without subreports.
Memory usage for this report is beofre building: 39 MB, after first build 66 MB, closing yields 55 MB, with each successive building and closing memory usage grows by 0.5 MB.

An example report with subreports shows 39 -> 101 -> 89 -> 132 -> 119 -> 160 -> 147...
The corresponding values for the other reports are similar.

How can I free the memory used for the subreports? I checked my VBA code and setting the local variables to NOTHING. I am wondering what is eating up all that space as the VBA code is negligible.
 
Have you tried compact & repair? In other computers happens the same? I'm asking you this because i'd been trying to reproduce the same behavior with no "luck". i got big table with countries and IP's to test the report with no issues.
My environment differs from yours mainly because of my MS is 2010 (x86) i have almost the same RAM in that particular PC and pretty much the standard configuration for a test pc.
 

Users who are viewing this thread

Back
Top Bottom