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

Can;t Find Project or Library 1

Status
Not open for further replies.

judyscofield

Programmer
Sep 24, 2001
56
US
I have an app built in Access2000. I've converted it to Access97 (some users only have 97 on their machine). When I try to run in 97 I get a compile error 'Can't find project or library' It's stopping the compile on a messagebox line ??? The line is Retval = msgbox("Must enter a date.",vbokonly,"Input Error").

Runs fine on my 2000 copy and a 2000 copy sent to someone else runs fine. A third person who has been testing the 2000 copy is also suddently getting this same error. What's up??

Judy
 
you might wanna check out the references...

grtz
CPUburn
 
This appears to be a very common, albeit very annoying occurence within Access. As CPUburn said, it sounds as though one or more of the references are missing. This can be caused for a number of reasons. From experimentation, one of the most common is if you switch OS from for example a win2000 machine to a win98 machine. The ocx files related to the reference libraries are stored (except for DAOxxx.dll, which is stored in Program Files, Common...), are stored within the Windows System folder. Win98 as default lives in n:\windows, whereas Win2000 by default lives in n:\Winnt.

Unfortunately Access appears very poor at handling references. One can successfully test for missing references, using the IsMissing function. I thought this could be useful, by coding IF ref.IsMissing = True Then ref.Remove. However, this cannot be achieved, because carrying out this procedure requires all references to be present & accounted for. You therefore have to manually take into account changes in OS. One workaround is to install the references on the fly, & alter their path based upon the windows system directory (Environ("WinDir"))...


Libraries also change, based upon version. In Access 2000 & beyond, DAO is not supported as standard. You have to manually add a reference to it. Working the other way, Access 2000 by default installs the ADO reference library, which I believe needs manually installing on office97. You therefore have to be quite careful when switching OS & versions of access...



James Goodman
 
Thanks, this helps. I found one reference that was marked MISSING, deleted it and it found it again in the same spot. You're right about the OS. Seems my problem was a combination of moving from Access2000 to Access97 along with one machine on ME and one on 98.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top