Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Feb 2011
    Thanked 0 Times in 0 Posts

    Modules lost from Database window but still in VBA project (Access 03)

    We've lost or somehow deleted some Modules, insofar as we can't see them in the Database window, but they still show up in the VBA Project window. They're not just "hidden". They don't come back when we "Compact and Repair". I can get them back by "removing" them from the VBA project, saying "yes" when it offers to archive them as a *.bas file, and then importing the *.bas file, but I'm worried that this might break something. Is there any other way to recover from this situation? Does anybody know how it might have come about (normally deleting a module in the Database window or the VBA Project deletes it from the other one automatically so they stay consistent)?

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Evergreen, CO, USA
    Thanked 65 Times in 64 Posts
    First of all, always work from a copy of your database until you are sure you have things recovered. Your issue appears to be a corruption issue where something in the Access engine isn't correctly linking to the modules, and Compact and Repair doesn't solve it. Saving the modules to .bas files and then importing them back is probably the best approach - it should correct the situation unless there is other corruption that is hidden. There is another option where you can export the entire database out to text, and then import it back into a new empty database. If the .bas approach doesn't work, post back and I'll dig up the details for you.

  3. #3
    Super Moderator RetiredGeek's Avatar
    Join Date
    Mar 2004
    Manning, South Carolina
    Thanked 1,533 Times in 1,390 Posts

    You could also download the free VBA Decompiler. I use this utility a lot to compress .mdb files. It can also sometimes fix problems such as you are having.
    May the Forces of good computing be with you!


    PowerShell & VBA Rule!

    My Systems: Desktop Specs
    Laptop Specs

Tags for this Thread

Posting Permissions

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