Out of memory- error 7

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi you all!

This is tooooo weird! When I'm trying to insert a new variable to my module
(dim i as integer) or a new sub or a new function, I get an error:
"Out of memory"
and explanation: "Out of memory (Error 7), More memory was required than is
available, or a 64K segment boundary was encountered. This error has the
following causes and solutions:" .. a huge list of possible reasons.

Is my database corrupted in some way? When I open a backup of this database
I am able to insert a new sub or anything I want into the module.

And what is 64K segment boundary? "Break large modules or procedures into
smaller ones. This doesn't save memory, but it can prevent hitting 64K
segment boundaries"

Any help would be appreciated :)

- Beginner -
 
Hi beginner,
You can try to compact and repair your database, perhaps the file is
damaged. Otherwise, as the error explanation say, you can't have module
bigger than 64k. The fact the error is raised when you add the declaration of
a new variable means you are right at the limit of the 64k per module. The
solutions is, instead of using long segment of code in your module, create a
function in another module and call it from your code so you reduce the
lenght of your code.

HTH Paolo
 
Yeah, I compacted and repaired, but it doesn't help. I find it odd that I
have the same code as a backup in my hard drive, and it works fine.. But I'll
guess I'll just start chopping my code into smaller modules.

Thank you for the information :)

- Beginner -
 
Back
Top