Access 2003 not enough memory error when opening forms

Posted on 2009-02-18
Last Modified: 2012-05-06
Apparently our Access 2003 database has gotten damaged.  On some forms when we try to open them I get "not enough memory, close unneeded programs"
On occasion I've been able to import forms from a backup up copy.  However this time I've gone all the way back to a 2007 version and get the same error.  There obviously is something else wrong.  I hope someone has a fix for this.
I've done a compile and a compact and repair.
Question by:jrsitman
    LVL 75

    Expert Comment

    by:DatabaseMX (Joe Anderson - Access MVP)
    A **DeCompile** may help here ...

    But first, if you have not already:
    Open the VBA Editor and from the menu ...Tools>>References ....
    If you see any listed as **Missing: <reference name>, including the asterisks and the word Missing, the
    you need to fix that first.

    Then, follow this procedure:

    0) **Backup your MDB BEFORE running this procedure**
    1) Compact and Repair the MDB, as follows:
    Hold down the Shift key and open the MDB, then from the menu >>Tools>>Database Utilities>>Compact and Repair ...
    Close the mdb after the Compact & Repair.
    2) Execute the Decompile (See example syntax below) >> after which, your database will reopen.
    3) Close the mdb
    4) Open the mdb and do a Compact and Repair (#1 above).
    5) Close the mdb.
    6) Open the mdb:
        a) Right click over a 'blank' area of the database window (container) and select Visual Basic Editor. A new window will open with the title 'Microsoft Visual Basic' ... followed by then name of your MDB.
        b) From the VBA Editor Menu at the top of the window:
            Note ... after the word Compile will see the name of your 'Project' - just an fyi.

    7) Close the mdb
    8) Compact and Repair one more time.

    *** Executing the DeCompile **EXAMPLE**:
    Here is an **example** of the command line syntax  (be SURE to adjust your path and file name accordingly) before executing the decompile:

    Run this from Start>>Run, enter the following command line - **all on one line** - it may appear like two lines here in the post:
    Also, the double quotes are required.

    "C:\Program Files\Microsoft Office\Office\Msaccess.exe" /decompile "C:\Access2003Clients\YourMdbNameHERE.mdb"

    For more detail on the Decompile subject ... visit the Master on the subject (and other great stuff) Michael Kaplan:


    Author Comment

    Does your reference to .mdb mean frontend or backend?
    LVL 75

    Expert Comment

    by:DatabaseMX (Joe Anderson - Access MVP)
    Do this procedure on you front end.


    Author Comment

    OK, I did it on a backup copy because the production copy is in use.  Your steps were easy to follow but it didn't help.  Any other suggestion would be appreciated.

    LVL 75

    Expert Comment

    by:DatabaseMX (Joe Anderson - Access MVP)
    Humm ... possibly a system issue.

    I hate to ask this, but have you rebooted a system with this issue?

    Also ... you can try this
    Open any Office app.
    From the Help Menu >> Detect and Repair.

    not sure what else to add at the moment ...


    Author Comment

    Most of our users run it via Citrix.  So after your thought of it might be a system problem, I tried it locally, still the same problem.
    I did the detect and repair and that didn't help.  So I then opened the database using Access 2007 and got the same error.

    If you get a brain storm let me know.

    Author Comment

    I imported the form into a different version of the database that we designed for another company.  The form works fine, in that version.  When I import it (with a different name) back into the problem version, it fails.  I'm hoping this will give you a clue.
    LVL 75

    Expert Comment

    by:DatabaseMX (Joe Anderson - Access MVP)
    The only other thing I can think of is this troubleshooting.

    First a question:

    Does the suspect form(s) have any code behind (a form module) ?

    If not ...  then examine the SQL for the form's record source independently. If it is a saved query, try running that query by itself from the query grid ... and see if you get this error.  If it's an SQL statement ... take the SQL can create a query in the query designer ... and run the query ... again to see if you get the error.

    IF .. the form does have code ... you need to set a break point at the first place where code would execute ... like for example in the On Open or On Load event ... and single step through until the error occurs ...

    Another remote possibility is ... do you have any Conditional Formatting in the forms?


    Author Comment

    The form does indeed have code behind. Worryingly, I can't open the form in design view either (so I can't see the code). I was able to use Application.SaveAsText to save the form; LoadFromText to load to a different formname gave an error 2001 "You cancelled the previous operation".

    The Recordsource is a SQL statement (attached, from the SaveAsText file).

    This form does not have conditional formatting, I'm pretty certain (but I can't open the form to see!!!)

    I'll keep digging and work with my consultant John Vinson to see what more we can uncover.

    RecordSource ="SELECT SafetyNet.ASN, SafetyNet.AnimalNo, SafetyNet.AnimalName, SafetyNet.DateIn"
            ", SafetyNet.DateOut, SafetyNet.SpeciesID, SafetyNet.BreedID, SafetyNet.Children,"
            " SafetyNet.Relinquishment, SafetyNet.Donation, SafetyNet.Comments, SafetyNet.Col"
            "or, SafetyNet.SpayNeutered, SafetyNet.ReturnedHome, SafetyNet.ShelterContact, Sa"
            "fetyNet.FosteredDate, SafetyNet.FosterName, SafetyNet.FosterPhone, SafetyNet.Age"
            ", SafetyNet.ShelterName, SafetyNet.ShelterPhone, SafetyNet.OwnerFirst, SafetyNet"
            ".OwnerLast, SafetyNet.OwnerPhone, SafetyNet.OtherExpense, SafetyNet.SoftSlipASN,"
            " SafetyNet.EndDate, SafetyNet.ActionASN FROM SafetyNet ORDER BY SafetyNet.ASN, S"

    Open in new window

    LVL 84
    <I was able to use Application.SaveAsText to save the form; LoadFromText to load to a different formname gave an error 2001 "You cancelled the previous operation".>

    Can you LoadFromText to a NEW database? If so, could you then perhaps import that to your current database?

    Accepted Solution

    We never really found the problem.  We had to import the database into a new frontend after we found a working version of the form from an older copy.  I'm not sure what to do about the points.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Suggested Solutions

    It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
    In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now