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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compile Error: Can't find object or library (Access2k) 1

Status
Not open for further replies.

DanielGreenwood

Technical User
May 9, 2002
21
0
0
GB

Hi,

I'm having trouble with one of my access databases. The database works fine on my PC but when users on other PC's click the buttons on the main form (to open reports and other forms) the debug window opens and it shows the message

Compile Error:

Can't find object or library

The offending function (Date(),Format$, Chr(13) etc...) is then highlighted in the VBA window.

When I look on the object browser the functions are there!

It appears this is the only database effected, any ideas or suggestions would be very welcome.

Thanks

Daniel.
 
Do they have an older version of Access than you? That could cause this problem.

Nelviticus
 

Hi Nelviticus,

I have recently converted the database from 97 to 2000 as most people are running that version now. However, I had the same problem with 97 users trying to open the 97 version as I'm getting with 2000. Conversion hasn't helped at all.

On both 97 and 2000 the functions appear in the object browser under the 'VBA' library.

This problem appears to be specific to this database, as other databases using the same functions are working fine.

I hope this sheds some more light on the subject.

Thanks

Daniel.
 
Not sure that I can help you, but I once had a database stop working when we upgraded Office. In my case it was the Date() function in query criteria rather than in VBA code that was throwing up errors ('unknown function' or something like that), and I fixed it by creating a brand new blank database then importing all of the objects (tables, queries, forms, modules, the lot) from the old one into the new.

Although this shouldn't have made any difference it fixed the problem. I put it down to a bug in Access.

Try it, it might work.

Nelviticus
 
Does this database link to any other Office application. I had a problem recently with different References within different versions of Office
 
In VBE have you checked that you don't have any missing (or wrong) reference ? This can happen when the different boxes don't have the same MDAC version.

Hope This Help
PH.
 

I've tried importing objects to a new DB - with no luck. It actually kicked out a few different errors, it was unable to find the 'Database' variable type??!!

The database did link to replicated 97 tables, I removed the links but still had the same problem.

PHV - Could you explain a bit more about what the MDAC is? I've checked that references are not missing using the object browser, however if I right click a function and click 'Definition' the same error appears. Its as if its lost a connection to the correct librarys.

Thanks for your continued help



 
MDAC: Microsoft Data Access Components (or something like)
This include DAO, ADO, RDS, ...
What I suggested is: Check the references in the Utils menu.

Hope This Help
PH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top