Hey, I'm having trouble for some reason with this query. It's telling me it can't find the object "Deletions" which is a valid table. Directly above this I do another operation with the same table referenced the same exact way. Is this a syntax thing?
I am going to add on some WHERE restrictions at the end here, but I took those off hoping it would solve my problem. But it didn't. What's wrong with this query - shouldn't it be putting everything from one table into the other as-is?! I've also tried this as a DoCmd.RunSQL, but still, same issue...
Code:
'this works
Dim qryImportRecords As String
qryImportRecords = "INSERT INTO [Deletions] IN '" & _
strPathToCurrentDatabase & _
"' SELECT * FROM [table2$] WHERE NOT IsNull([table2$].field1)"
Cn.Execute qryImportDeletionRecords
'this doesn't work... ?!?
Dim qryTestAndTransfer As String
qryTestAndTransfer = "INSERT INTO tempTable SELECT * FROM [Deletions]"
Cn.Execute qryTestAndTransfer
I am going to add on some WHERE restrictions at the end here, but I took those off hoping it would solve my problem. But it didn't. What's wrong with this query - shouldn't it be putting everything from one table into the other as-is?! I've also tried this as a DoCmd.RunSQL, but still, same issue...
Last edited: