Solved

Out of Memory Error when trying to compile MS Access 2013

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

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 36

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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
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.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

726 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