Results 1 to 3 of 3

Thread: Querring a recordset?

  1. #1
    PORRASTAR
    Guest

    Querring a recordset?

    Hi
    Does anyone have info on the sort property of a recordset and possibly an example showing how its used?
    Thanking you in advance
    PORRASTAR

  2. #2
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538
    The sort method sorts the recordset by the columns you specify :
    Code:
    rsTemp.Sort "Column2", "Column1"
    Will make the recordset show the records in sorted by the second column, then the first, so :

    1 | 3
    2 | 2
    3 | 1

    becomes :

    3 | 1
    2 | 2
    1 | 3

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  3. #3
    Hyperactive Member gravyboy's Avatar
    Join Date
    Jan 2000
    Location
    Where I was before . . . if you don't know then you're new!
    Posts
    334
    S'probably much better to order the recordset via the defining query . . . .

    Code:
    SELECT Field1, Field2, Field3 FROM tblTable WHERE Field9 = <SOMETHING> ORDER BY Field3, Field1
    Matt G
    VS6 Ent SP5 @ Work
    VS6 Ent SP5 & VB.Net @ Home
    [email protected]



Posting Permissions

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



Click Here to Expand Forum to Full Width