Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Compile Error

Status
Not open for further replies.

rebel4k

IS-IT--Management
Apr 18, 2002
80
GB
I have a problem in that whenever I try to open a particular access database, the database opens but I also get a Visual Basic window opening up and an error message saying "Compile Error: Can't find project or library". The VB window in the background also contains text which is highlighted saying "Dim db As Database". Does anyone know what this means and if so what the fix is. If I have posted this in the incorrect forum, please advise where I need to post it.

Thanks
 
Go to a VBA window (Design view of a Module, for example).

Click Tools, References and review the list of references that have been set in your db. Check to see if any are marked as missing. If they are, highlight and browse to the correct location for the reference. I'll lay a bet you're missing a reference to a DAO library, 3.5 or 3.6. If it helps any, I find my DAO library in C:\Program Files\Common Files\Microsoft Shared\DAO but this may vary depending on version of Access and installation thereof.

When you've corrected any missing references, try recompiling.

[pc2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top