Results 1 to 2 of 2
  1. #1
    vientito is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Oct 2014
    Posts
    26

    recordset clone method


    Executing a recordset.clone method will create a clone. Could this cloned recordset be used for editing the underlying records as well, just like the original?

    If I use a recordset without explicitly calling openrecordset (e.g. just use what it is that I get when the form loads) I know it is not my responsibility to close it.

    On the other hand, the cloned recordset has to be explicitly closed by me, right?

    Closing one recordset will not affect the other subsequent operation, I suppose?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Yes, the clone can be used to edit records.

    It is possible to manipulate the clone without creating recordset object. Example:

    With Me.RecordsetClone
    .Edit
    .Division = "LLSB"
    .Update
    End With

    I think Recordset objects are supposed to automatically close and the variables clear when procedure finishes but is good practice to explicitly close and set variable to nothing.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 7
    Last Post: 09-28-2023, 08:41 AM
  2. Replies: 4
    Last Post: 08-12-2014, 08:47 AM
  3. Output form recordset clone to word
    By silverspr in forum Programming
    Replies: 1
    Last Post: 02-07-2013, 01:32 PM
  4. RecordSet Clone Problem with code
    By rlsublime in forum Programming
    Replies: 8
    Last Post: 06-21-2012, 11:56 AM
  5. multiple combo boxes recordset clone
    By trigirl67 in forum Forms
    Replies: 1
    Last Post: 01-30-2012, 02:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums