Not an expert on recordsets and stuff but if your using DAO recordsets then I think the AbsolutePosition property only returns the correct position for dynaset or snapshot recordsets.
If your recordset has no records in it it will return -1. So check your recordsets to ensure that you have records within your recordset.
Hi,
As Taslin said, open your recordset as a dynaset and check if it has any records for the specified criteria. And I believe the position of the record would be Absolute Position + 1 ( zero based positioning of recordset, I believe ) Hope it helps. Let me know what happens.
With regards,
PGK
I'm not really sure how these recordsets work either, but it seems to be depend on the property settings for the Recordset and Command objects before you open the RS - for instance opening a Client-side Keyset recordset with Optimistic locking always seems to allow me to get the correct Recordcount and AbsolutePosition property values (i.e. not -1)
Dunno if this helps, just thought I'd chuck me oar in.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.