• 512-991-7197
  • This email address is being protected from spambots. You need JavaScript enabled to view it.
  • Always Open

Welcome to Microsoft Access Tips & Tricks

VBA Code Does Not Work On ACCDE File

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

I once have experienced the very strange behavior of MS Access 2007, the one that didn't exist in the previous version. The strange thing was that after I did the coding and then I made ACCDE fie (figure 1), all of the event of VBA code in the compiled MS Access DB didn't work. While the original ACCDB file worked OK.

To get to the screen below just press Ctrl + GFirst I thought, there must be something wrong with my code. I looked everywhere, none seemed to be a problem.

I searched on the internet to see who used to have the same problem. It seemed like nobody did have this problem. Then I came accross one forum, and I found the solution for this. The reason why nobody faced the same problem might be that I missed the very fundamental 101 in MS Access 2007 thing that need to be done. However, this has never been a problem for me when I used MS Access 2003 or MS Access 97. And yes, my problem was resolved.

The resolution for this is ALWAYS compile VBA code before making ACCDE file. To do this, see the below instruction and screenshot.

  1. Go to menu Debug and click Compile [your MS Access database name]. In this example I use Northwind which was provided by Microsoft.

Recommend other relevant articles:



© 2019 Austin Laptop [AustinLaptop.Com]. All Rights Reserved.