Fix memory leakage when you open Access forms > 300 times ,run ou.

I

Ifoundit

Try this test open any simple form and close again ,eventually MSAccess will
bring up message not enough memory.
eg try Northwind database opening categories form..
Point at which it happens depends on complexity of form .This is a Big BANG
bug!
This occurs in ACCESS2003 ,ACCESS97 and probably all other versions.

Private Sub Categories_Click()
Dim n As Long
Do Until n = 4000

DoCmd.OpenForm "Categories", acNormal, , , acFormEdit, acWindowNormal

n = n + 1
Forms![Main Switchboard]![x] = n
Unload "Categories"
DoCmd.Close acForm, "Categories"

Loop
Exit Sub
End Sub
 
D

david epsom dot com dot au

http://support.microsoft.com/kb/331989
"This problem is fixed in Office XP Service Pack 3"

I don't have any such problem in A97, but I don't
know what you are doing with
Unload "Categories"

(david)

Ifoundit said:
Try this test open any simple form and close again ,eventually MSAccess will
bring up message not enough memory.
eg try Northwind database opening categories form..
Point at which it happens depends on complexity of form .This is a Big BANG
bug!
This occurs in ACCESS2003 ,ACCESS97 and probably all other versions.

Private Sub Categories_Click()
Dim n As Long
Do Until n = 4000

DoCmd.OpenForm "Categories", acNormal, , , acFormEdit, acWindowNormal

n = n + 1
Forms![Main Switchboard]![x] = n
Unload "Categories"
DoCmd.Close acForm, "Categories"

Loop
Exit Sub
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top