Solved

Out of Memory Error when trying to compile MS Access 2013

Posted on 2014-07-27
5
1,286 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 35

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 35

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

831 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