Compile Error (from Windows 2000 converted to Windows XP Pro)

P

Phoebe Brimer

We have a form w/ a subform used for data entry of sales.
We recently installed a new computer and our database,
which works fine in Windows 2000 and Windows XP Home, now
gives a compile error in Windows XP Pro. HELP!

The error reads "Compile Error: Can't find project or
library". The code error is below on line starting
rs.FindFirst.... it doesn't like the "Str".

Option Compare Database

Private Sub Combo18_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[niMaster_ID] = " & Str(Me![Combo18])
If Not rs.EOF Then
Me.Bookmark = rs.Bookmark
Else
MsgBox "Cannot find Master Record!" & vbCrLf
& "Please contact your Administrator.",
vbCritical, "Unable to Locate Master Record"
End If
End Sub

Can anybody help??

Thanks,
Phoebe
 
P

Phoebe Brimer

Van,

Thanks. It worked like a charm.

Phoebe
-----Original Message-----
Probably Reference Errors. See Douglas J. Steele Web site:
Errors.html

--
HTH
Van T. Dinh
MVP (Access)



Phoebe Brimer said:
We have a form w/ a subform used for data entry of sales.
We recently installed a new computer and our database,
which works fine in Windows 2000 and Windows XP Home, now
gives a compile error in Windows XP Pro. HELP!

The error reads "Compile Error: Can't find project or
library". The code error is below on line starting
rs.FindFirst.... it doesn't like the "Str".

Option Compare Database

Private Sub Combo18_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[niMaster_ID] = " & Str(Me![Combo18])
If Not rs.EOF Then
Me.Bookmark = rs.Bookmark
Else
MsgBox "Cannot find Master Record!" & vbCrLf
& "Please contact your Administrator.",
vbCritical, "Unable to Locate Master Record"
End If
End Sub

Can anybody help??

Thanks,
Phoebe


.
 

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