Your references are probably messed up.
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)
For far more than you could ever want to know about this problem, check out
http://members.rogers.com/douglas.j....nceErrors.html
As for the Error$ problem, even if fixing the references corrects it, you
should convert all of your Error$ to Err.Description : Error$ was replaced
quite some time ago, and I suspect that at some time the backwards
compatibility is going to disappear.
--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(No private e-mails, please)
"Peter Mather" <pm**@value.net .nz> wrote in message
news:61******** *************** *********@4ax.c om...
Hi,
I have struck problems when trying to convert an Access97 database to
Access 2000.
I get a compile Error when I start the database in Access 2000.. The
message is Can't find project or library. In the procedures it
highlights the Error$ statement and in functions it highlights Left$ and
Mid$
Here is a sampel of the function code
If IsNull(frm.Open Args) Then
Exit Function
Else
intSemi = InStr(1, frm.OpenArgs, ";")
If intSemi = 0 Then
Exit Function
End If
strControlName = Left$(frm.OpenA rgs, intSemi - 1)
strControlValue = Mid$(frm.OpenAr gs, intSemi + 1)
' Possibly this OpenArgs belongs to someone else
' and just lookslike ours. Set the error handling
' to just ignore any errors on the next line
On Error Resume Next
frm.Form(strCon trolName) = strControlValue
End If
Here is the procedure
Sub Form_Current()
On Error GoTo Form_Current_Er r
If ChildFormIsOpen () Then FilterChildForm
Form_Current_Ex it:
Exit Sub
Form_Current_Er r:
MsgBox Error$
Resume Form_Current_Ex it
End Sub
I hope that somebody can give me some guidance towards a solution. I do
not have enough skills to troubleshoot this problem.
Thanks,
Peter Mather