Results 1 to 3 of 3
  1. #1
    Join Date
    May 2006

    Unanswered: AbsolutePosition returning wrong value

    I'm back, with another problem that seems like it should be easy to fix, but I can't find the solution anywhere on google.

    I'm using: MS Access 2003, VBA 6.0, and ADO.

    I'm trying to run a search feature that will impose a filter onto an open recordset and display the filtered records. It works correctly, but when I try to display at the bottom of the page "Record # of ##", using the absolute position and record count properties, I'm getting the wrong data. To get the data, I have:
    txtRecord = rsPerson.AbsolutePosition
    txtTotal = rsPerson.RecordCount
    Fairly simple, right? And the record count gives me the correct number of records, but the absolute position gives me where that record would be in the unfiltered recordset.

    Which means I'm displaying thinsg like: Record 7 of 3, as the first returned record. What am I missing? Everything I've seen says that Absolute Position should return the record number in the filtered recordset, but it's not.

    As a postscript: does anyone have any recommendations for good books from which to learn ADO? I've gotten everything I know about it off the internet in the last two months, and I'd really like a good reference book to fall back on. Thank you kindly,


  2. #2
    Join Date
    Nov 2003
    Try using Me.CurrentRecord

    The best book......the Internet.

    Self Taught In ALL Environments.....And It Shows!

  3. #3
    Join Date
    Apr 2003
    Alabama, USA

    You live and learn. At any rate, you live. - Douglas Adams

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts