Compile error: Cant find project or library - Access 2007 / Windows 7
Posted on 2010-01-08
I have an Access 2007 database. My XP computer hard drive recently crashed. I put in a new hard drive and had to install Windows 7. The database works on an XP machine.
When I try to run my database, I get the error:
Compile error: Cant find project or library
This error also occurs when I open some of the forms.
I do not have any references identified as missing.
The references I have are (in order)
Visual Basic For Applicxations
Microsoft Access 12.0 Object Library
Microsoft Office 12 Authorization Control 1.0 Type Library
Microsoft Office 12.0 Object Library
Microsoft Office Outlook View Control
Microsoft Outlook 12.0 Object Library
Microsoft ActiveX Data Objects 2.0 Library
Microsoft DAO 3.6 Object Library
If I try to complie, I get the compile error again.
The first error occurs when I open the Main Page. It hangs on the code vb code:
'Counts all files in the folder C:\ACRdocuments\Images\BGimages\
Set objFiles = fso.GetFolder("C:\ACRdocuments\Images\BGimages").Files
CountFiles = objFiles.Count
It hangs on on pages with the On Current event and there is a Date in the code.
Me.OrderDt = Date