Compile Error

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
 
G

Guest

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.
 
J

Jim Evans

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


.
 

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

Similar Threads


Top