Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Out of Memory Error when trying to compile MS Access 2013

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

765 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