Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Jun 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Recordset (Access 97)

    How do you create a Recordset from a Recordset or can I?

  2. #2
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Richland, Washington, USA
    Posts
    407
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Recordset (Access 97)

    Your question is a little vague, but if you're using VBA you can do something like:

    Dim rstOld as Recordset
    Dim rstNew as Recordset

    Set rstOld = CurrentDb.OpenRecordset("MyTable", dbOpenDynaset)
    Set rstNew = rstOld.RecordsetClone
    .
    .
    .

    Hope this helps.

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Recordset (Access 97)

    You wrote:
    Set rstOld = CurrentDb.OpenRecordset("MyTable", dbOpenDynaset)
    Set rstNew = rstOld.RecordsetClone

    This won't work in Access97. The RecordSetClone property can only be used on a form. In Access2000 you can use:

    Set rstNew = rstOld.Clone
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    New Lounger
    Join Date
    Jun 2002
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Recordset (Access 97)

    Appreciate the help,

    What I am trying to do is make a recordset from an SQL then,
    I need to query that recordset and make a new recordset from the query.

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Recordset (Access 97)

    You can't query a recordset. You query tables or other queries, but not recordsets. However, DAO recordsets do have a Name property that returns the SQL that created the recordset if that's of any help. You can also filter a recordset, but you can't do any of the expected query things like joins.
    Charlotte

Posting Permissions

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