Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 16th, 2005, 02:10 AM
Authorized User
 
Join Date: Sep 2004
Location: Twickenham, , United Kingdom.
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Paulsh Send a message via Yahoo to Paulsh
Default Releasing Memory in Access

I have a module that produces a number of reports. Usually this runs without problem, but as the data collected has grown and the number of reports has increased, the module occasionally runs out of memory. I realise I can split the module but is there a programatic way that I can release the resources between the production of the reports?

Thanks
Paul

Paul
__________________
Paul
  #2 (permalink)  
Old August 19th, 2005, 01:47 PM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

Here is what I found:
RESOLUTION
To resolve this problem, obtain Microsoft Office 2000 Service Release 1/1a (SR-1/SR-1a).

To obtain SR-1/SR-1a, click the article number below to view the article in the Microsoft Knowledge Base:
245025 (http://support.microsoft.com/kb/245025/EN-US/) OFF2000: How to Obtain and Install Microsoft Office 2000 Service Release 1/1a (SR-1/SR-1a)

The problem is that Access does not release memory until a script (vba) has finished running. Since 2000 and later are Unicode, the memory required is much greater than with 97.

You may have to split your code if this isn't the issue.

I was looking for a ReleaseBuffer() or ReleaseMemory() function, as in .NET, but didn't find anything.


mmcdonal
  #3 (permalink)  
Old August 24th, 2005, 07:32 AM
Authorized User
 
Join Date: Sep 2004
Location: Twickenham, , United Kingdom.
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Paulsh Send a message via Yahoo to Paulsh
Default

Thank you mmcdonal. I find I can prevent the error happening if I am in the debug window. I can split the module too. I'm running Access 2002 and will be upgrading to 2003 soonish. Maybe that will make the problem worse?

I was sure I had seen something previously in a manual or a procedure I was reviewing, which gives the operating system a small breather, but I cant seem to find it again. Should have taken note the first time.

Appreciate your help.
Cheers
Paul

Paul


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disposing / Releasing objects yamyam C# 5 February 17th, 2006 04:06 AM
Memory access using vb.net Morrislgn VB.NET 2002/2003 Basics 0 February 6th, 2006 08:28 AM
Releasing VBA Application clueless_may Access VBA 2 June 17th, 2004 12:06 AM
Invalid access to memory location sahih Beginning PHP 3 March 17th, 2004 09:17 PM
Access stay in memory with .ColumnWidth property xmasm1 Access VBA 3 August 19th, 2003 07:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.