none
Issue with upgrade an MS Access Application from 2003 to 2010. Getting "The database cannot be opened because the VBA project contained in it cannot be read" errors. RRS feed

  • Question

  • Can anyone point me in the right direction on how to deal with upgrading the application.  When I open it, I can't view any of the modules, and continuously just get that error message.

    Thanks,

    Jeff

    Tuesday, August 28, 2012 3:51 PM

Answers

  • I want to make sure I understand your need here.

      • Are you only running the A2003 Application in Access 2010?
      • Are you wanting to upgrade the db to the accdb/e/r Format?

    1) You shouldn't have this problem but if you Compact & Repair in A2010 you will have issues. If you make any changes in A2010 that include sorts and calculations and other things not supported in A2003 then you will have some problem. Essentially if you make any change or Compact & Repair in A2010 you will have problem.

    2) For upgrading, although Access has the Conversion Button, My experience is that the results are buggy. If you want to upgrade the db to 2010 you really should create a new shell and import everything into it.

    HTH


    Chris Ward

    • Edited by KCDW Tuesday, August 28, 2012 4:41 PM
    • Marked as answer by Jeff Cleath Tuesday, August 28, 2012 10:18 PM
    Tuesday, August 28, 2012 4:40 PM

All replies

  • Hopefully you were doing this in a copy and saving the original.

    The easiest and safest method IMHO is to create a new blank db (make sure you select General index). Then import all onjects into it.

    Basically you have corruption in the db.

    You can try to Decompile / Compile and Compact and Repair but usually does not work (at least no 100%)

    If you already were working in this method then just try again.


    Chris Ward

    Tuesday, August 28, 2012 3:55 PM
  • Chris, first of all thank you for responding.

    I tried the compact and repair and that gave the same error message and then does nothing after clicking cancel on the error.  It does although also give me the error message "The expression you entered has a function name that the database can't find.

    Keep in mind that this application still runs fine with no errors in MS Access 2003.

    I get that error message when working with any object in the database.  I could try the importing of all code back into the project.  I haven't done that before but I am guessing I would just do that to the modules since they seem to be the only things I can't actually get to when using MS Access 2010.

    Let me know if you have any other thoughts.

    Thanks,


    Jeff

    Tuesday, August 28, 2012 4:28 PM
  • I want to make sure I understand your need here.

      • Are you only running the A2003 Application in Access 2010?
      • Are you wanting to upgrade the db to the accdb/e/r Format?

    1) You shouldn't have this problem but if you Compact & Repair in A2010 you will have issues. If you make any changes in A2010 that include sorts and calculations and other things not supported in A2003 then you will have some problem. Essentially if you make any change or Compact & Repair in A2010 you will have problem.

    2) For upgrading, although Access has the Conversion Button, My experience is that the results are buggy. If you want to upgrade the db to 2010 you really should create a new shell and import everything into it.

    HTH


    Chris Ward

    • Edited by KCDW Tuesday, August 28, 2012 4:41 PM
    • Marked as answer by Jeff Cleath Tuesday, August 28, 2012 10:18 PM
    Tuesday, August 28, 2012 4:40 PM
  • Jeff

    Access 2010 has a known bug for corrupting the VBA code if you have installed SP1. Try installing the hotfix at http://support.microsoft.com/kb/2596585

    Compacting will not clean it up. As Chris said, decompiling might work if it isn't too corrupt. Importing into a clean database usually works in this case.


    Bill Mosca
    http://www.thatlldoit.com
    http://tech.groups.yahoo.com/group/MS_Access_Professionals

    Tuesday, August 28, 2012 9:23 PM
  • Thanks again Chris. 

    I had installed the Hotfix and that didn't make any difference. 

    The application is currently being used with MS Access 2003.  It is working without any errors, but I would like to upgrade it to the latest version of Access hoping that there are some improvements that make it worthwhile other than just being on the latest version.

    I want to upgrade it to use 2010 so would also upgrade it to use the accdb format unless there is a reason not to.

    I did as you suggested and exported and imported all code from one system to the other.  The tables, reports I kept as is.

    The system now seems to be working fine after adding the code and the references needed.  Hopefully there won't be any hidden problems but for now I have been able to convert it to 2007 format and create the accde application as well.

    Thanks,

    Jeff


    Jeff Cleath

    Tuesday, August 28, 2012 10:27 PM