A2007 ADO Recordset Clone

  • Thread starter Thread starter JimS
  • Start date Start date
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
 
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
 
Back
Top