Not enough Memory (1 Viewer)

silentwolf

Active member
Local time
Yesterday, 21:53
Joined
Jun 12, 2009
Messages
575
Hi guys,

now I came accross a error.
When I try to enter a code in my Database FrontEnd it gives me that error.

Not enough Memory Error Nr.7 :eek:

So I am just wondering I looked up but not sure why it cause this issue.

Could it be as the Folder I have the Database located is getting to large?
Or to many Procedures can be in a Module? How many can you have?

Maybe someone can give me a bit of a better explaination on what this could cause this issue in Access.

Many thanks

Albert
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 23:53
Joined
Feb 28, 2001
Messages
27,194

silentwolf

Active member
Local time
Yesterday, 21:53
Joined
Jun 12, 2009
Messages
575
Hi DocMan,

I was out ... Unfortunetelly I am using Windows 10 Access 2016.

The issue is when I try to add another procedure or any code in that regards into my FE.

My DB is just on a Local C:Documents Folder

So I never came accross anything like that before.. So could it be that the Folder is getting to large?
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 23:53
Joined
Feb 28, 2001
Messages
27,194
OK, several possible limits.

First, unless your disk has 0 free space, the odds are it isn't disk space. And a Windows folder has size limits of "available free space." Unless you have actually filled the disk, a folder cannot get too large.

Second, Access does have some internal limits. The absolute max for an Access monolithic project is 2 Gb. If your file is approaching that size, you could indeed be running afoul of the Access internal addressing limits.

Third, you can have up to 1000 modules (including any class modules associated with forms and/or reports).

The next couple of limits were harder to find.


Max 1,024 characters per line.
Max 6,601 lines per procedure.
Max 65,545 lines per module.

To be honest, I doubt you would run into the max characters/line or lines/procedure limits. But in theory, you could concatenate something in a way to blow the chr/line limit. Just highly unlikely.

But then, there is the issue of the actual meaning of "Out of memory." This gets trickier because that is a RUN-TIME error, which means it could be something you did when the code was actually running but that wouldn't occur if no code is running.

If you know the meaning of "recursion" I can tell you that a few levels of recursion, particularly "runaway recursion," will very quickly blow memory away.

If you try to dynamically ReDim an array to very large size, that will do it.

If you try to open or create a large number of dynamic objects including application objects, that has a good shot at scarfing down memory.

If you are opening a lot of files but you are not closing them immediately when done, each open file reserves a chunk of memory for disk buffers and a file-handle structure (an internal Windows structure for file control). You could blow out memory that way. Same would be true for any recordsets. If either files or recordsets are being opened in a loop and not closed, it would be trivial to reach a point of memory exhaustion.
 

silentwolf

Active member
Local time
Yesterday, 21:53
Joined
Jun 12, 2009
Messages
575
Hi Doc_Man,

thanks for your reply!

I think I found the problem!

If you know the meaning of "recursion" I can tell you that a few levels of recursion, particularly "runaway recursion," will very quickly blow memory away.
Yes I do and I am pretty sure that what the issue was!

I had some Codesamples in a Code Module, in some of them there where some Recursive Procedures.
Perhaps a code was still running in the background.

I removed this module and and it seams to be working.

Further more, this module was about connecting to Outlook so I guess perhabs the code or the application was still running in the background.

So I will try to continou and see if that done the trick!

Will keep you posted

Cheers for pointing it out.

Albert
 

Users who are viewing this thread

Top Bottom