×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Out of memory error in Access VBA editor

Out of memory error in Access VBA editor

Out of memory error in Access VBA editor

(OP)

Hi

I have a fairly large Access db (about 1GB) that has been working absolutely fine.  Now everytime i attempt to edit some code, or insert new code it deletes the line and gives me an 'out of memory' error

Looking at the help it says reduce the amount of public variables - I have 10 of them

Could anyone shed any light ?

Cheers
Tim

RE: Out of memory error in Access VBA editor

Though I try to avoid public variables, 10 won't kill an app.

Since 1GB is only half the limit, that shouldn't be the problem either, then let's round up the usual suspects

1 - though the aout of memory error probably doesn't relate to this, the behaviour of deleting lines/letters in the editor can occur based on having a form open which utilizes the timer function

2 - some hardware related stuff related to your computer or network

3 - some kind of corruption - there shouldn't be anything stopping you from at least trying some of the tips and tricks for working with corrupted dbs - start with taking some copies of the db, and keep the original, in case you'll need professional/paid assistance.

Here's some text I'll sometimes drop into threads were I suspect corruption might be an issue:

"This faq Corrupt Microsoft Access MDBs FAQ has a lot of info concerning corruption, symptoms and how to deal with it. MakeItSo's FAQ705-4683 also has some recommandations.

During the last years, I've resolved all my code corruption issues using the /decompile option, in stead of importing objects. It's described here Decompile or how to reduce Microsoft Access MDB/MDE size and decrease start-up times

Here's also an option that might provide some results on exporting/importing database objects thread705-834817."

There's also a utility which is downloadable from Microsoft called JetComp (which I've never tried)

Roy-Vidar

RE: Out of memory error in Access VBA editor

When you are in the VBA editor, close the code windows for any forms, modules, classes, reports that you are no longer working on.  If you leave them open, then close the database, the next time you open the database and go into the VBA editor it loads each of these code windows again.  Each one takes up some memory.

I've inherited databases from programmers who never closed these windows, and when I opened the database I would recieve "out of memory" errors.  As I closed the 50 or so code windows, I could see the memory getting reclaimed.

This was with Access2000, I don't know if this issue has been resolved with 2003 - but it's worth checking.

RE: Out of memory error in Access VBA editor

First time I have heard about that you need to close the code windows.
I tried that on one of my programs, closing all windows before closing the program. But when I open it all the code-windows were also opened.

I use Access 2000.

RE: Out of memory error in Access VBA editor

I think you need to make a change, like adding a blank line.  Then close all modules, then save your changes (doing a compile would probably be good to).  The next time you open your code editor the modules should be closed.

RE: Out of memory error in Access VBA editor

Yes, that worked.
Now I have lots of work to do.
I manage 30 Access programs and I'm working with code all the time.
So now I need to make sure that I close every window from here on. smile

RE: Out of memory error in Access VBA editor

In this post:
"Out of memory" msg with Win98/Access 2002 & VB editor
thread705-712053

DeanWilliams shows how to close all code windows.

RE: Out of memory error in Access VBA editor

How are ya TimGoff  . . .
Rrealize your talking a Memory Resource issue here!

I've had the same issue with db's as small as 200MB, but that 200MB cromprises mostly code!

When this problem arises I simply close all code windows except the one I'm working on . . . Has worked everytime!

Your Thoughts? . . .

See Ya! .  .  .  .  .  .

RE: Out of memory error in Access VBA editor

Hit submitt too soon!

First place to look is any other major applications running at the same time!

See Ya! .  .  .  .  .  .

RE: Out of memory error in Access VBA editor

This is DeanWilliams' code:

CODE

    Dim intWin As Integer
    Dim intCount As Integer
    Dim intCur As Integer
    
    intCount = vbe.CodePanes.Count
    SysCmd acSysCmdInitMeter, "Closing VB Windows...", intCount
    
    For intWin = 1 To intCount
        vbe.CodePanes(1).Window.Close
        SysCmd acSysCmdUpdateMeter, intWin
    Next intWin
    
    SysCmd acSysCmdRemoveMeter
From: "Out of memory" msg with Win98/Access 2002 & VB editor
thread705-712053
 


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close