Results 1 to 7 of 7

Thread: LDB prob?

  1. #1
    Join Date
    Sep 2003
    Location
    MN US
    Posts
    313

    Unanswered: LDB prob?

    I have an Access 2002 db running on single machine (Win98).
    The problem I have is intermittent. After closing the application once, or sometimes 2 or 3 times, the db will not load. It creates the LDB file but stops there.
    I'm able to then open the file from the Access menu, however it is not exclusive. (Opening the LDB in notepad shows 2 identical entries, same user/node)
    The LDB file only deletes when I reboot the machine.

    The Onclick event that closes the database is DoCmd.Quit

    I've tried repairing the db, and moving it to another machine with no luck.

    Any ideas are appreciated.

  2. #2
    Join Date
    Dec 2003
    Location
    Toronto, Ont. Canada
    Posts
    238

    Re: LDB prob?

    Originally posted by cpgospi
    I have an Access 2002 db running on single machine (Win98).
    The problem I have is intermittent. After closing the application once, or sometimes 2 or 3 times, the db will not load. It creates the LDB file but stops there.
    I'm able to then open the file from the Access menu, however it is not exclusive. (Opening the LDB in notepad shows 2 identical entries, same user/node)
    The LDB file only deletes when I reboot the machine.

    The Onclick event that closes the database is DoCmd.Quit

    I've tried repairing the db, and moving it to another machine with no luck.

    Any ideas are appreciated.
    Try creating a new blank database and importing all objects and relationships from the old one... See if you have the same problem... If noone else is using the database, and you're getting this problem, there could be some form of corruption going on...

    HTH

  3. #3
    Join Date
    Sep 2003
    Location
    MN US
    Posts
    313
    Thanks Trudi,
    Tried your suggestion but same result.

  4. #4
    Join Date
    Sep 2003
    Location
    MN US
    Posts
    313
    You were correct about the corruption. I have one form, that when opened is causing the error. (At least it appears that way).
    Any idea what would 'corrupt' a form? It's a main/subform situation with several tabs. There are 9 tabs (subforms attached), otherwise a simple form.

  5. #5
    Join Date
    Dec 2003
    Location
    Toronto, Ont. Canada
    Posts
    238
    Originally posted by cpgospi
    You were correct about the corruption. I have one form, that when opened is causing the error. (At least it appears that way).
    Any idea what would 'corrupt' a form? It's a main/subform situation with several tabs. There are 9 tabs (subforms attached), otherwise a simple form.
    Corruption isn't something I would ever try and explain... It just happens sometimes and we developers have to be ready for it... I'm assuming you don't have a backup copy of the database anywhere? (Don't let that one happen again... ...)

    The next thing I'd try if I were you... is to decompile...

    Here's a blurb I found a long time ago explaining it... (It's explained better here than I ever could... )

    Use the undocumented Decompile command line switch for Access to boost database performance.

    Over time, the part of your Access database that stores VBA module code can become bloated and, in some cases, can cause strange or otherwise unexplained behavior. As you compile and run code, VBA leaves behind old states of code that are no longer valid. Often, the Access Repair and Compact operation doesn't free up this space. To solve these problems, use the undocumented Decompile command line switch for Access. This switch is supported in Access 97, 2000, and 2002 and tells Access to discard all compiled code. This leaves you with just VBA source code, ensuring nothing is left behind to bloat your database.

    To decompile your database, follow these steps:

    1. Close an open instances of Access.
    2. From the command line, type msaccess.exe /decompile.
    3. Access opens up. Open the database you want to decompile. Depending on the version of Access you're using, you may or may not see a message about VBA code. If you do see the message, just ignore it.
    4. Open up any module. Select the Compile All Modules and Save All Modules menu items.
    5. Close your database.
    6. Close Access.

    Restart Access normally (i.e., without the command line switch) and perform a Repair and Compact on your database. The size should be reduced, and any strange errors related to VBA code will most likely be gone.
    Sorry... I should have kept the link instead... but I hope this helps...

  6. #6
    Join Date
    Dec 2003
    Location
    Toronto, Ont. Canada
    Posts
    238
    One more thing... Make sure you Back Up the database first!

  7. #7
    Join Date
    Sep 2003
    Location
    MN US
    Posts
    313
    Thanks again Trudi!
    Through some tedious trial and error, I discovered the problem to be with a calculated field in a subform. The formula was complex but seemed to be working properly.
    Performing the calculation in the underlying query (rather than in the form) did the trick. Not sure why exactly.
    I'll keep your notes for future reference, I'm sure they'll be helpful.

    Best,
    CP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •