Public Function CloneRecordset(rs As Recordset) As Recordset
Dim strWork As New ADODB.Stream
On Error GoTo CloneRecordset_Error
' Spara input recordset till stream
rs.Save strWork, adPersistADTG
' Skapa ett nytt recordset for output
Set CloneRecordset = New ADODB.Recordset
CloneRecordset.Open strWork
' Frigör minne
Set strWork = Nothing
Exit Function
CloneRecordset_Error:
Set CloneRecordset = Nothing
End Function