Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    May 2002
    Location
    Florence, Oregon, USA
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access2000 VBA Recordset Name

    I have created a single table Access2000 database and an Access form with which to enter the table

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

    Re: Access2000 VBA Recordset Name

    What it requires is a reference to the object variable you've assigned the recordset to. In other words, if you do this:

    Dim rst As Recordset
    Set rst = Me.Recordset

    Then rst is the object you use to MoveFirst, or whatever.
    Charlotte

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

    Re: Access2000 VBA Recordset Name

    Wait, I just reread your post. If you don't want to actually move the record pointer, you need to use the recordsetclone, although an ADO recordsetclone is a somewhat different animal from a DAO recordsetclone, so you need to specify which object model you're using.
    Charlotte

  4. #4
    3 Star Lounger
    Join Date
    May 2002
    Location
    Florence, Oregon, USA
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access2000 VBA Recordset Name

    Your advise to use the recordsetclone proberty seems like the best solution. I am relearning VBA (last used V1) and it seems simplest to confine myself to the newer ADO model. While the help system documents both DAO and ADO Clone methods, I can find no mention of ADO recordsetclone property support. Can you point me in the right direction?

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

    Re: Access2000 VBA Recordset Name

    Recordsetclones aren't the same thing at all in ADO. In fact, what they are is separate recordsets created using the clone method. So if you want to use ADO, use the recordcount property of the subform's recordset, which will return a -1 if there are any records.
    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
  •