Results 1 to 4 of 4

Thread: recordsets question

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2001
    Location
    New Zealand
    Posts
    268

    recordsets question

    hello,

    in ADO, can u use on recordset as a basis for a select statement on another one.

    for example, if you have rstNames with a bunch of names, could u create a rstA and use rstNames to obtain all the names starting with A from rstNames?

    Thanks for your time
    Ang

  2. #2
    Junior Member
    Join Date
    May 2001
    Location
    PHilippines
    Posts
    20
    You don't have to create another recordset just to obtain a resultset that has a name starting from 'A'. All you have to do is to pass a query the filters your previous recordset --'rstNames'-- to display all names starting from 'A'.

    Try this code:

    rstNames.Open "Select * from [table name] where name like 'A%',cn,adLockReadOnly,adCmdText

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2001
    Location
    New Zealand
    Posts
    268
    ok ta

  4. #4
    Swatty
    Guest
    You could also filter your recordset.
    VB Code:
    1. rstNames.Filter = "name like 'A%'"
    After the use of it you can reset the filter by

    rstNames.Filter = ""

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