“Compile Error: Can’t Find Project or Library” in Access
This error means your database’s VBA code depends on a library that isn’t available on this computer. It’s confusing because Access often highlights a basic function like Date, Left, Format, or Trim, even though that function isn’t the real problem. One missing reference breaks the whole code project.
It usually shows up when a database moves to a new computer, a new version of Office, or a user with a different setup.
Common causes
- The database references a specific version of Excel, Outlook, or Word that isn’t installed on this computer
- An older ActiveX control (calendar pickers, tree views, common dialog controls) isn’t installed
- A third-party add-in or custom library was installed on the developer’s machine but not the user’s
- 32-bit and 64-bit Office are mixed across the team
How to fix it
- Open the VBA editor with Alt+F11.
- Go to Tools > References.
- Find any entry marked “MISSING:” in the list of checked references.
- Uncheck the missing reference, or check the matching library that is installed on this computer (for example, a newer Microsoft Excel Object Library).
- Click OK, then go to Debug > Compile to confirm the error is gone.
- Save the database and test it on every computer that uses it.
Prevent it next time
A developer can rewrite code that automates Excel or Outlook to use “late binding,” which removes the version-specific reference entirely. This is the most reliable fix when users run different Office versions.
Need it fixed across your team?
If the error comes back every time someone opens the database on a different computer, the code needs a permanent fix. See our VBA Debugging & Enhancement service or book a free diagnostic.
