Error in Access 2007 Corrupt VBA project

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wevans
    New Member
    • Feb 2008
    • 7

    Error in Access 2007 Corrupt VBA project

    I designed a db in Access 07 and opened it up once in Access 2003. No when I open it up in 07 again I get this message...

    "The database cannot be opened because the VBA project contained in it
    cannot be read. The database can be opened only if the VBA project is
    first deleted. Deleting the VBA project removes all code from modules,
    forms and reports"

    Is there any way to extract the vba code and modules from the corrupt db? I would really hate to have to rewrite ALL the code over again. If I can get the modules and codes out maybe I can fix what might be wrong.
  • mshmyob
    Recognized Expert Contributor
    • Jan 2008
    • 903

    #2
    Access 2003 cannot read an Access 2007 file - it has a new extension of .aacdb.

    I assume you created it in Access 2007 but saved it in the 2003 format.

    Originally posted by wevans
    I designed a db in Access 07 and opened it up once in Access 2003. No when I open it up in 07 again I get this message...

    "The database cannot be opened because the VBA project contained in it
    cannot be read. The database can be opened only if the VBA project is
    first deleted. Deleting the VBA project removes all code from modules,
    forms and reports"

    Is there any way to extract the vba code and modules from the corrupt db? I would really hate to have to rewrite ALL the code over again. If I can get the modules and codes out maybe I can fix what might be wrong.

    Comment

    • Megalog
      Recognized Expert Contributor
      • Sep 2007
      • 378

      #3
      Did you try starting a new db in Access 2007, and then importing what you can from the corrupt copy via 'External Data' > 'Import' > 'Access' ?

      Or if that doesnt work.. then maybe open it up again with an Access 2003 copy, and then copy out the code into notepad or something....

      Comment

      Working...