Copy recordset not working

rickyfong

Registered User.
Local time
Today, 00:00
Joined
Nov 25, 2010
Messages
199
Dim rsRecordset As Recordset
With DB

Set rsRecordset = .OpenRecordset("TRANSACTION where NAME = '" & TTNAME & "'", bOpenDynaset)

End With


Dim sqlStatement As String
sqlStatement = "INSERT INTO TEMPFILE1 VALUES" & rsRecordset

'
With rsRecordset

rsRecordset.MoveFirst
Do
rsRecordset.RunSQL (sqlStatement)
rsRecordset.MoveNext
Loop While Not rsRecordset.EOF

End With


The insert into not working, the error message saying that rsRecordset is not the right type, any idea?? Thanks a lot!!
 
Yeah, that's completely invalid. Why not just execute an append query using SQL that pulls from the first table?
 

Users who are viewing this thread

Back
Top Bottom