Solved

Out of Memory Error when trying to compile MS Access 2013

Posted on 2014-07-27
5
1,254 Views
Last Modified: 2016-11-23
I need some help understanding how to allocate page files or something memory related that is preventing my rather large MS Access application from compiling.

Symptoms: After adding a small amount of new VBA code, I try to compile and get "Out of Memory" error.  The VBA editor highlights some code in my reports, which are the last objects added when I import them to build out a new development file.  

I've tried shrinking the application, but even after pulling out old objects or obsolete modules, I'm still getting this error which is hampering the development process.  I'm developing on a 3 yr old Dell Precision M6600 16GB ram, Windows 7 SP1, dual 2.3 Ghz processors (8 cores) and 45 GB of available hard drive space.  I've recently defragged the drive, and Windows is handling page file settings.

Any help figuring out the root cause of this error would be greatly appreciated.

Thanks!
0
Comment
Question by:David Smithstein
  • 2
  • 2
5 Comments
 
LVL 34

Accepted Solution

by:
PatHartman earned 400 total points
ID: 40222777
Could be corruption.  Start with compact and repair.  Then try the /decompile switch.  If you've never heard of this, you might want to search here and read about it first but essentially, it is an undocumented feature that the MS Access team added to Access to help with their development.  It removes all the pcode (compiled code).  To decompile, use the Run command from the windows start menu.

c:\yourpath\yourdbname.accdb /decompile

And the last step is to create a new empty database and import all your objects.  If you suspect where the corruption is, do everything but that object and see what happens.  Then try to import the suspect object(s).
0
 
LVL 84

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 100 total points
ID: 40222836
Note too that after you Decompile your code, you should Compile it. To do that, open the VBA Editor and click Debug - Compile. Fix any errors you come across, and keep doing that until the Compile menu item is disabled.

And don't forget to make a backup first.
0
 

Author Comment

by:David Smithstein
ID: 40222895
So far so good, but I also got rid of some objects I didn't need, or at least saved them for a rainy day in case I did.  I decompiled, compiled and added the code that was tripping the memory error on the form I was working on and my app compiled right away.

I'm in the middle of a development project, so I'm going to give it a day or two to resurface. If I can deal with it using decompile, or if it doesn't come back, I'll close the question and award points.

Can corruption effect behavior in non-corrupted objects?

Thanks!
0
 
LVL 34

Expert Comment

by:PatHartman
ID: 40222907
pCode is what is usually corrupted but I have had queries and tables that were corrupted.  Since we don't really know what causes the corruption, I don't think we can predict the effect.  It doesn't metastasis the way cancer does if that's what you mean.   Once the corruption has been "cured", you should be fine although it wouldn't hurt to open a new database and import all the objects anyway.  Don't forget to define your references and start up options.

While you are in heavy development, always shut Access down every couple of hours and make a backup.  Compact and repair and go back to work.  Keep at least a couple days worth of these inter-day backups in case you need to resurrect corrupted objects or bring back something you accidentally deleted.  I find that the more I change some object and the longer Access stays open, the more susceptible it is to getting flaky.  It probably has to do with garbage collection or a memory leak.
0
 

Author Closing Comment

by:David Smithstein
ID: 40223454
Thanks you guys.  It is behaving like a corruption issue that decompile seems to have fixed.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Access Date Query 28 30
Splitting out Data 14 28
How to make an ADE file by code? 11 42
Best Approach MS Access 2013 3 23
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now