Results 1 to 9 of 9
  1. #1
    2 Star Lounger
    Join Date
    Feb 2002
    Posts
    155
    Thanks
    0
    Thanked 0 Times in 0 Posts

    VBA Out of memory (2000 (SR-1))

    Recently whenever I test run my program, and try to invoke VBA editor, my system (Windows Me with 386 MB RAM) isssued me an "Out of Memory" warning, and I couldn't run the VBA editor. I still have more than 100 MB free memory then! My program consists of only a front-end (7600 KB) and a test back-end (956 KB). It runs well on another Windows98 machine with 256 MB RAM. Why gives?

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: VBA Out of memory (2000 (SR-1))

    This sounds suspiciously like either something is hosed with the VB6.dll file, or you have a set of code running somewhere that hasn't gotten turned off. I would look at the VB6 issue first. Have you installed any software recently? There are several products that apparently put an incompativle version of the VB files on your hard drive and replace things without asking or telling you.
    Wendell

  3. #3
    2 Star Lounger
    Join Date
    Feb 2002
    Posts
    155
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA Out of memory (2000 (SR-1))

    I disabled or closed the five resident launchers in my system - GetRight, ZoneAlarm, PGP, MemTurbo and Norton Antiirus Auto-Protect - and re-started my Access 2K. After loading my database, I managed to use VBA editor for a while. After I added more codes and objects to my database, again the warning "Out of Memory" appeared when I tried to access the VBA editor. I didn't install any new programs for the past three months except Windows and Norton Virus pattern updates, which were periodically run when I was connected to the Internet.

    I remembered reading about the maximum size of data Access can process, but I have yet to come across any mention of the limitation on codes and objects in an Access database. Is there a maximum size to the codes and objects which Access can manage before the dreadful "Out of Memory" alarm?

  4. #4
    New Lounger
    Join Date
    Dec 2000
    Location
    Rockhampton, Queensland, Australia
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA Out of memory (2000 (SR-1))

    Have you left any recordsets open, and then re-opened them? It also pays to set them to 'Nothing' after closing.

    Failing to do the above will gobble up your memory.

  5. #5
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: VBA Out of memory (2000 (SR-1))

    Check out MS knowledge base article Q223235 - it sounds very similar to your problem. The solution appears to be to import all the objects into a new database and then close a code window after editing. We work with some projects with hundreds of modules, so I doubt you've hit any Access size constraints - to see what those are for 2000, search Help for "specifications"
    Wendell

  6. #6
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Niagara Falls, New York, USA
    Posts
    1,878
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA Out of memory (2000 (SR-1))

    Hi lesoch

    I have your same configuration and get the same message.

    It usually occurs in the middle of the day after tasking between a2k, word, aol, etc.

    I close all apps and shutdown and restart the system to continue without message.

    Wendells solution will works as well.

    Charlotte talks about leaky code that can cause problems, Do a search on leaky

    Others say when you task between Office modules billy bob does a terrible job reclaiming memory.

    Hope others can respond, out of memory gets scary.

    HTH

    re: 104429 from Support4John

  7. #7
    2 Star Lounger
    Join Date
    Feb 2002
    Posts
    155
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: VBA Out of memory (2000 (SR-1))

    Surely "Out of Memory" alarm is scary. I checked the KB article suggested by Wendell (thanks) and it appeared that the problem is limited to Access 2K and VBA editor. It never occurred to me that I need to close the code windows each time I open one to save system resources. I was under the impression that only a code window was opened when I used the VBA editor. I closed my code windows and mentally calculated that I closed a total 63 code windows. After closing all the code windows, the database ran a little faster but there was no guarantee that the scary alarm message won't reappear. In fact it did!

    I checked my codes and all my recordsets, and workspaces were closed and set to nothing before exiting. There is no possibility of memory leakage, I think. But closing ZoneAlarm, Norton Auto-Protect and MemTurbo to reclaim memory rersources also helped to make "Out of Memory" disappear. I wonder if others have similar experience.

  8. #8
    Bronze Lounger
    Join Date
    Nov 2001
    Location
    Arlington, Virginia, USA
    Posts
    1,394
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: VBA Out of memory (2000 (SR-1))

    You had 63 code windows open??!!

    Back a while ago WMVP Kevin posted some simple but very useful code in the VB/VBA forum that closes all open code windows in the VB Editor. Link:

    <!post=VBE Code Pane vs. Object Pane ,144534>VBE Code Pane vs. Object Pane <!/post>

    You may want to copy this code to standard module and run as often as necessary. In VBE you can run any public sub from the Tools>Macros menu (macro here as in Word or Excel, not Access, sense).

  9. #9
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: VBA Out of memory (2000 (SR-1))

    If you had 63 code windows open, I'm not at all surprised you got an out of memory message. Did you also have 63 forms or reports open in the UI? It is possible to generate a bogus out of memory message, but in this case, I'd say it was entirely truthful. Say rather that the problem is new to Access 2000 because of the change to the VBE.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •