Share via

Access Runtime does not execute VBA code

Anonymous
2017-10-22T01:05:10+00:00
favorite I have been developing an Access database with VBA code for a few months and it has been working fine, until last week. The last night it worked, I added some code I found online to "bypass the bypass" (#3 at<br>http://www.techrepublic.com/blog/10-things/10-tips-for-securing-a-microsoft-access-database/). I went into and out of my database a few times, no problem.<br><br><br><br>   I shut down the laptop, but the next morning, when I pressed any of the command buttons, none of the VBA code would execute. I tried multiple previously saved copies of the database, none of the buttons work. I even tried a couple of different databases,<br> no buttons work. But when my coworker tried my original database, it works fine.<br><br><br><br>   I have recompiled, compact and repair the database and my IT department has uninstalled and reinstalled MS-Access, but no change in symptoms. I am stumped. I am running Access 2010 (32 bit) and Windows 7 Professional.<br><br><br><br>   So, I commented out the "bypass the bypass" code I copied from the link above (the last code added before this issue showed up), then created a brand new database, imported all of the tables, data, queries, forms and modules. The VBA code worked. I pressed<br> the buttons and they worked as expected. The code needed to be compiled, and it still worked after compiling. But once I performed a compact/repair, and the database closed, when I reopened it, the buttons did not work.<br><br><br>   Any help would be appreciated. Thanks.
Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2017-10-22T06:28:33+00:00

Sounds like your database is longer in a Trusted Location.  I would check that and see if that resolves your problem.

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

5 additional answers

Sort by: Most helpful
  1. Anonymous
    2017-10-26T00:50:11+00:00

    I didn't change the location. It is still in the same folder on my laptop. I don't know what was set up as a trusted location prior to the problem, but now it has two locations, the location of Microsoft Access and my database. Well, at least I know how to fix it if it happens in the future. Thanks again.

    Was this answer helpful?

    0 comments No comments