Compile Error

  • Thread starter Thread starter Confused
  • Start date Start date
C

Confused

I get a compile error that says "Can't find project or
library" after using the wizard to create a combo box to
find records on my form. What is this caused by and how
can I correct it? I've tried to delete the combo box and
recreate it again with the wizard but I still get the same
error.

The "Str" is highlighted in the VB window when I get the
error.

Private Sub cboPartNoSearch_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[IPID] = " & Str(Me![cboPartNoSearch])
Me.Bookmark = rs.Bookmark
End Sub
 
hi,
more that likely it's library.
open your code. goto tools>references.
these are your libraries. i have no idea which one you are
missing so you may have to check trial and error.
 
If it's choking on the Str() function, my guess would be a missing reference
to the Scripting Runtime Library.

Jim Evans

hi,
more that likely it's library.
open your code. goto tools>references.
these are your libraries. i have no idea which one you are
missing so you may have to check trial and error.
-----Original Message-----
I get a compile error that says "Can't find project or
library" after using the wizard to create a combo box to
find records on my form. What is this caused by and how
can I correct it? I've tried to delete the combo box and
recreate it again with the wizard but I still get the same
error.

The "Str" is highlighted in the VB window when I get the
error.

Private Sub cboPartNoSearch_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[IPID] = " & Str(Me![cboPartNoSearch])
Me.Bookmark = rs.Bookmark
End Sub


.
 
Back
Top