Bizare error project or library not found

S

Sean

Hello All,

I'm in need of some serious help. I've got an Access 2000
database that I inherited, that I've been heavily
modifying. Everything has been working fine, but now on
two of ten machines I get an error on the following code.
The error is project or library not found. The line is the
environ(indx) line. If I create a brand new database and
then import in my module, it runs fine. On my machine and
many others, everything is fine. So far it is just two
computers that are giving me fits. Does anyone have a clue?

Sean


Do
EnvString = Environ(Indx) ' Get environment
' variable.
If Left(EnvString, 9) = "USERNAME=" Then ' Check
PATH entry.
usrname = Right(EnvString, Len(EnvString) - 9)
dne = 1
Exit Do
Else
Indx = Indx + 1 ' Not PATH entry,
End If ' so increment.
Loop Until EnvString = ""
 
S

StCyrM

Sounds like a References problem to me.

This can be caused by differences in either the location or file version of
certain files between the machine where the application was developed, and
where it's being run (or the file missing completely from the target
machine). Such differences are common when new software is installed.

On the machine(s) where it's not working, open any code module (or open the
Debug Window, using Ctrl-G, provided you haven't selected the "keep debug
window on top" option). Select Tools | References from the menu bar. Examine
all of the selected references.

If any of the selected references have "MISSING:" in front of them, unselect
them, and back out of the dialog. If you really need the reference(s) you
just unselected (you can tell by doing a Compile All Modules), go back in
and reselect them.

If none have "MISSING:", select an additional reference at random, back out
of the dialog, then go back in and unselect the reference you just added. If
that doesn't solve the problem, try to unselect as many of the selected
references as you can (Access may not let you unselect them all), back out
of the dialog, then go back in and reselect the references you just
unselected. (NOTE: write down what the references are before you delete
them, because they'll be in a different order when you go back in)

Hope this helps

Best regards

Maurice St-Cyr
Micro Systems Consultants, Inc
 
G

Guest

Sounds like a References problem to me.
This can be caused by differences in either the location or file version of
certain files between the machine where the application was developed, and
where it's being run (or the file missing completely from the target
machine). Such differences are common when new software is installed.

On the machine(s) where it's not working, open any code module (or open the
Debug Window, using Ctrl-G, provided you haven't selected the "keep debug
window on top" option). Select Tools | References from the menu bar. Examine
all of the selected references.

If any of the selected references have "MISSING:" in front of them, unselect
them, and back out of the dialog. If you really need the reference(s) you
just unselected (you can tell by doing a Compile All Modules), go back in
and reselect them.

If none have "MISSING:", select an additional reference at random, back out
of the dialog, then go back in and unselect the reference you just added. If
that doesn't solve the problem, try to unselect as many of the selected
references as you can (Access may not let you unselect them all), back out
of the dialog, then go back in and reselect the references you just
unselected. (NOTE: write down what the references are before you delete
them, because they'll be in a different order when you go back in)

Hope this helps

Best regards

Maurice St-Cyr
Micro Systems Consultants, Inc


Maurice,

I was thinking the same thing, but the place I am getting
the compile error has been in my code for months now. I
don't understand why I get a compile error in my mdb, but
if I create a new mdb and past in the exact same code, the
error does not happen. I get the error on the environ
function, which as far as I can tell is in the VBA
reference. That reference is always loaded.

Thanks for your reply though. When I get more time, I'm
going to dig deeper to see if I can figure out what is
going on.

Sean
 
J

Jamie

You could also try calling your VBA functions explicitly such as VBA.Environ
, VBA.left etc etc

Jamie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top