displaying a recordset backwards

Results 1 to 2 of 2

Thread: displaying a recordset backwards

  1. #1
    D. Ian Mortimer Guest

    Default displaying a recordset backwards

    If you have a recordset created, but you wanted it displayed backwards(like when new records are added on a daily basis, but you wanna display them oldest record first). Do you display from EOF back to BOF?<BR><BR>-I

  2. #2
    Join Date
    Dec 1969

    Default RE: displaying a recordset backwards

    Well, you can move all the way to the end of the recordset then move toward the beginning, however, there is probably an easier way. Are you familiar with the ORDER BY clause? You can order a column. So, you can do:<BR><BR>SELECT * FROM Table1 ORDER BY DateEntered<BR><BR>To order by a column named DateEntered. You can also add the Keyword DESC at the end of the SQL String (SELECT * FROM Table1 ORDER BY DateEntered DESC) to order it in descending order. This approach will incur less overhead than first moving to the end of the recordset, then travrersing back to the beginning. (Although traversing backwards is possible. IF that&#039s really what you want/need to do, just ask, and I&#039ll tell you how! :)

Posting Permissions

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