Results 1 to 8 of 8
  1. #1
    ironfelix717 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2018
    Posts
    150

    MS Access VBA Corruption : "The database cannot be read because...."

    Hi,

    I am facing VBA corruption on a DB (.accdb). When launching the file, I get "The database cannot be opened because the VBA project contained in it cannot be read...."

    Corruption of the master project occurred after the following events:
    ---Exporting a form from a temp database to a master project
    ---Making some form design changes with the new form

    Other info:
    ---I have already ran the decompile switch with no success
    ---Opening the VBA project to do anything is impossible - the prompt just keeps being a PITA.
    --I know exactly which modules in the VBA project that might be suspect for corruption


    Information on this issue around the web just refers to Access 2010 (I am on 2019) and conflicts/bugs with Runtimes. Both of those scenario seem absolutely unrelated to my instance and it sounds more to me like plain old corruption.
    I have a viable backup, but would like to recover what I can if feasible.

    If you feel this corruption is remediable then I'm open to suggestions!



    Thanks

  2. #2
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,821
    Hi

    Have you tried doing an Import into a new Blank Database?

  3. #3
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Lots of good info but one thing left out - the bitness versions of Office. Perhaps where you got the form from was one version and the current project is something else? I would be surprised to learn that would do it, but who knows? Or maybe you're on a different version with the current project (e.g. you worked on it at home and took it to work and they're not compatible).
    P.S. your profile details say other than Access 2019?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    ironfelix717 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2018
    Posts
    150
    Quote Originally Posted by mike60smart View Post
    Hi

    Have you tried doing an Import into a new Blank Database?
    Hey Mike, I have not tried that and am confident it would work - However, doing this import would be way too much work as there are lots of forms/objects in the DB.



    Lots of good info but one thing left out - the bitness versions of Office. Perhaps where you got the form from was one version and the current project is something else? I would be surprised to learn that would do it, but who knows? Or maybe you're on a different version with the current project (e.g. you worked on it at home and took it to work and they're not compatible).
    P.S. your profile details say other than Access 2019?
    Micron, the master was originally created with 32 bit Access 2016 about 1.5 years ago. Since then, i've migrated to 64bit 2019 and have saved continual copies of the master for about 50 revisions. The runtime i am using is 2010 (but i'm not compiling my DB yet because its in development).
    The source DB (temp db) that had the original module/form that i imported INTO my master was made on 2019 64 bit.

    Thanks

  5. #5
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Can you say why that would be too much work? You go to Get External data to import from an Access file, choose a file and on each of the 6 tabs, Select All, click OK and watch for maybe 20 seconds?

  6. #6
    GinaWhipp's Avatar
    GinaWhipp is offline Competent Performer
    Windows 7 64bit Access 2013 32bit
    Join Date
    Jul 2011
    Location
    Ohio, USA
    Posts
    377
    Hmm, another thought comes to mind. If you are *switching* bitness you might want to consider adding PtrSafe which works in 32 bit or 64 bit that way it kind of becomes irrelevant the bitness of Office.

  7. #7
    ironfelix717 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Oct 2018
    Posts
    150
    Hi,

    Some updates.
    Can you say why that would be too much work?
    I hadn't realized that the import/export feature was so handy. I ended up doing this anyway with my working backup to roll-out any chance of future corruption.



    Here are some details that remain true:

    1.) Import/Export is not possible because the project does not cooperate, and that is whether you are importing from the master db or exporting from it.

    2.) An attempt to salvage the project on another machine with MS Access 64 bit 2016 (versus 2019) yielded a more manage-able "experience" when opening the file (less frequent error prompt) but had no success.

    3.) Peculiarly, an update to Office 2019 occurred on the workstation the same day that the corruption occurred.


    Fortunately, I have a backup, though a week out-dated, this is no emergency by any means.

    So, what caused this? Prior to this corruption was a form import, module import, and then some design changes to a subform object (linking the new imported form to the subform in an existing form) - after which ,the crash occurred. I was prompted to save a backup at the initial crash and DID but somehow that backup is gone from existence. It is not in my recycling bin or anywhere (overwritten??).

    Secondly, it is strange that the office update happened the same day...the crash occurred around midnight so......

    Unsure on what the cause is, could've been a number of factors. What we do know is that...

    Office products are embarrassingly fragile - but we've known this.


    Thanks for suggestions/comments - I am done pursuing this.
    Regards

  8. #8
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    FYI - according to another site, the message about the db being in an inconsistent state seems tied to a particular Office update and in spite of efforts? from M$ the accepted solution is to roll back to the prior update. So what I'm saying is that there is proof out there that updates do corrupt things that were working before. Rolling back an update isn't within my sphere of knowledge so I'm speculating that it might be an option for you to explore. If it's the culprit, you can probably expect this to recur so you should be prepared for that - backup design changes on a daily basis for the time being. Perhaps you can open a ticket with M$ if you think it's due to the update, or start researching on a daily basis to see if others report the same issue.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 10
    Last Post: 08-08-2019, 11:05 AM
  2. Replies: 1
    Last Post: 04-25-2018, 10:27 AM
  3. Replies: 14
    Last Post: 08-19-2013, 09:37 AM
  4. Replies: 4
    Last Post: 06-10-2010, 07:51 AM
  5. Replies: 0
    Last Post: 10-13-2009, 11:54 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums