?
Solved

Out of Memory Error when trying to compile MS Access 2013

Posted on 2014-07-27
5
Medium Priority
?
1,389 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
[X]
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
  • 2
  • 2
5 Comments
 
LVL 38

Accepted Solution

by:
PatHartman earned 1600 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 85

Assisted Solution

by:Scott McDaniel (Microsoft Access MVP - EE MVE )
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 400 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 38

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
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 …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Suggested Courses

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