Need help duplicating data

j0se

Registered User.
Local time
Today, 14:05
Joined
Jan 15, 2003
Messages
57
I need to duplicate a recordset in a table. How is this best done please?

1 set up a temp table, copy the recordset to the temp table and use an append query to re-added to the original table?

or do it in code using recordset.clone?

I'm not sure of how to do this using either method, so any help would be great

Thank you all
:o
 
sql = "SELECT * FROM tblMyTable WHERE {insert your where clause here}"
rst = CurrentDB.openRecordset(sql)

while not rst.EOF
sql = "INSERT INTO tblMyTable (field1, field2, field3) VALUES ('" & rst("field1") & "','" & rst("field2") & "','" & rst("field3") & "')"
CurrentDB.Execute sql
rst.movenext()
wend
 

Users who are viewing this thread

Back
Top Bottom