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 Westi 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

Status
Not open for further replies.

Tronsliver

Technical User
Sep 19, 2000
120
US
Hoping someone can help with this: Listed below is code for one of my modules. When I try and delete a record this code is activated. Basically it's function is to go through a recordset and find occurences of a name and report back how many instances it found. However, when I run the program the heading of the module is highlighted in yellow (error) and the message "Can't find project or Library" message box pops up. Also the first instance of "&" is highlighted in blue within the module. Thanks:

Private Sub Form_Delete(Cancel As Integer)
Dim rst As Recordset
Dim x As Byte
Dim varx As Byte

Set rst = CurrentDb().OpenRecordset("Rater", dbOpenTable)

x = Findx(varx)

If x > 0 Then
MsgBox (Forms!RaterF!LName & " is in " & x & " rating scheme(s)." _
& Chr(13) & "Must replace " & Forms!RaterF!LName & " in all" & Chr(13) & _
"schemes before you can delete ")
Forms!RaterF!SSN.SetFocus
End


End If
End Sub

Public Function Findx(varx As Byte) As Byte
Dim rst As Recordset
Dim OfficerName, Response As String

Set rst = CurrentDb().OpenRecordset("OfficerQ", dbOpenDynaset)
varx = 0

With rst

.MoveFirst
Do Until .EOF
If (Forms!RaterF!OfficerID = !RaterNum) Or (Forms!RaterF!OfficerID = !IntNum) Or _
(Forms!RaterF!OfficerID = !SeniorNum) Then
varx = varx + 1
End If
.MoveNext
Loop
Findx = varx

rst.Close
End With

End Function

 
"Can't find project or Library" This message can be due to changes in your system configuration (dll). In Module, editing mode, have a look at Tools/References, I guest there will be a reference missing.

If not, did this module worked corectly in the past ?

 
Yes it did work before. In fact, after I developed the program, it was set up on another machine, then after some time, I e-mailed the progam back to the original machine and found out at that time the procedure didn't work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top