Results 1 to 8 of 8
  1. #1
    PeakH is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    143

    Access Runtime: Won't open database. VBA cannot be read.

    I have access runtime on one computer that opens the front end, with a back end saved on another computer on the network. It was working well since I put it on that computer a couple months ago, and worked great on Friday when I left work. I walk in this morning and it brings up a message saying:



    "It is not possible to open the database because the VBA project contained in it can not be read. The database can only be opened if the VBA project is deleted first. Deleting the VBA project removes all code from modules, forms, and reports. You must back up the database before attempting to open the database and delete the VBA project.
    To back up, click Cancel, and then create a backup of your database. To open the database and delete the VBA project without backing up, click OK"

    I have tried deleting the database from that computer and reloading it from another computer. From the full front end on another computer (not runtime) I have tried compiling the VBA, I have compacted and repaired the database, and then re-uploaded this to the runtime computer. These have not worked. I have read on other forums that to get around this people have changed the version of office they're using but that was back in October and the version I have was working perfectly just before this weekend.
    I did make some changes to the database on Friday, but as far as I remember all I did was change a few lines with accmdSave to accmdSaveRecord.

    Any idea why I might be getting this and what I can do to stop it?

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    Can you open it in Full Access app?
    if you get this message here, then the db is corrupt. Restore from backup.

    if you get it only in RunTime then you may need another RT. are you on the most recent version?

  3. #3
    PeakH is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    143
    It's only on Runtime, all the other full versions work great.
    I'll check the version and try updating RT.

  4. #4
    PeakH is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    143
    so I tried re-downloading the latest version of RT, uninstalling what I had on there, reinstalling the new one (I may have already had the latest one, but I'm not sure how to check). The installer also has a repair option that I've tried a couple times now and so far no luck. Same thing is happening.

  5. #5
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,927
    The message does imply the front end is corrupted, are both full versions and runtime versions the same? be it 2010, 2013 or 2016? Are they both 32 or 64bit?

    Have you visited these pages?

    https://support.microsoft.com/en-us/...he-built-in-wi
    https://support.microsoft.com/en-us/...de-accde-or-ad

    have you tried decompiling your working FE before compacting and recompiling?
    Have you tried supplying a .accde to the runtime machine rather than a .accdb

  6. #6
    PeakH is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Jan 2017
    Posts
    143
    The problem started on a computer with the full version as well later in the day yesterday. Everything is 2016. I don't know how to tell if they are 32 or 64.

    I tried both decompiling (which I didn't know was a thing before), and saved the .accdb as a .accde on the RT computer as well as the other computers that don't need the full version.
    This seemed to do the trick! I'm not sure what that did so I'll continue to keep an eye on it and do more research, but we're at least able to continue working.

    Thanks for all your help!

  7. #7
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Quote Originally Posted by PeakH View Post
    I don't know how to tell if they are 32 or 64.
    Go to File ... Help and look at the About Microsoft Access section on the right

    If you can run the ACCDE file on both machines they are both the same 'bitness'
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  8. #8
    Minty is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2017
    Location
    UK - Wiltshire
    Posts
    3,157
    Take backups of your working versions frequently!

    And make fresh backups before any changes no matter how minor.

    You should really backup you backend data at least once a day, and when you are developing I personally backup every time I open the file (automatically with another database, but that's because I hate losing work! and am lazy).
    DLookup Syntax and others http://access.mvps.org/access/general/gen0018.htm
    Please use the star below the post to say thanks if we have helped !
    ↓↓ It's down here ↓↓

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

Similar Threads

  1. Replies: 6
    Last Post: 12-16-2016, 06:43 PM
  2. Replies: 2
    Last Post: 12-19-2014, 07:41 AM
  3. Replies: 1
    Last Post: 08-03-2014, 07:36 AM
  4. Open Access Database in Read Only Mode
    By praloy in forum Programming
    Replies: 2
    Last Post: 03-28-2012, 10:50 PM
  5. Runtime Error '3027': Database or object is read only
    By 4x4Masters in forum Programming
    Replies: 4
    Last Post: 06-08-2010, 08:02 PM

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