First, in your code you REALLY REALLY REALLY should define your reocrdset
type:
Your code example IS ADO!!!!
There is NO find method in DAO, so, in fact, if your code is now working,
then you "object" actually IS a ADO reocrdset!!
Note that when you assign a recordset to a recortset var, it takes on the
type YOU defined. By using object, you have no idea, or clue as to what type
of object the recordset returns. So, in DAO, we get:
Dim rst As DAO.Recordset
set rst = me.RecordSetClone (note again, "recordsetclone" NOT
Reccord.Clone!!!!)
rst.FindFirst "[DbBoxId] = " & str(Nz(Me![ComXxFind], 0))
If rst.noMatch = False Then
Me.Bookmark = rst.Bookmark
End If
If you do not use recordSetClone, then you don't even have to use the book
mark. eg:
Dim rst As DAO.Recordset
set rst = me.RecordSet (in this case NO CLONE!)
rst.FindFirst "[DbBoxId] = " & str(Nz(Me![ComXxFind], 0))
Since we are executing directly on the forms recordset, then you don't even
have to use the bookmark.
Likey the above of set rst = me.RecordSet.Clone would also work. (but you
could try it..if the form does
not move..then you WOULD need the bookmark code).
And:
Dim rst As ADODB.Recordset
rst.Find "[DbBoxId] = " & str(Nz(Me![ComXxFind], 0))
If rst.Find.EOF = False Then
Me.Bookmark = rst.Bookmark
End If
As mentioned, DAO does NOT have a find method, but ADO does!....so, your
example code is ALREADY in ADO...
note that both recredset, and recordsetClone can be stuffed into a DAO, or
ADO reocrdset (the choice of ado, or dao being returned is going to be based
on how you define the reocrdset. And, even more amazing is the reverse is
true!! You can stuff a dao, or ado reocrdset into a forms source!!
set me.RecordSet = rstDaoRecordSet