A2007 ADO Recordset Clone

J

JimS

The following code fails when the ".filter" method is invoked with an error
indicating that it doesn't support bookmarks. rstBoMDetail is an
ADODB.Recordset, open and not empty. I just added this code to this class.
Class has been working fine, using the rstBoMDetail recordset often. Anyone
know why?

With rstBoMDetail.clone
.Filter = "BoMID =" & NewID
If Not .EOF Then
.Find "BoMItemID=" & rstModelBill!BoMItemID, ,
adSearchForward, 1
End If
If Not .EOF Then
lngDupBomItemID = !BoMDetailID
End If
boolDup = Not .EOF
End With
 
T

Tom van Stiphout

On Thu, 19 Nov 2009 12:12:01 -0800, JimS

Not all recordsets support bookmarks. Test for it:
With rstBoMDetail.clone
if .Properties("Use Bookmarks") = False then
Msgbox "Boo-hoo: can't use bookmarks!"

-Tom.
Microsoft Access MVP
 

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

A2007 ADO Update 1
More Fun with Classes 2
Copy ADO Recordset 2
DAO Clone and filter question 1
Loop through recordset with a twist 1
Compile Error ?? 0
Compile Error ?? 2
stuck in a loop 5

Top