Y
Yanick
I am trying to append data from a table to a temporary table, which I will use to manipulate data. Here is the code I use:
Dim strSQL As String
strSQL = "INSERT INTO TempTable ( PN ) SELECT [TBL-PN].PN FROM [TBL-PN] _ WHERE ((([TBL-PN].PN) Like 'c6*')) GROUP BY [TBL-PN].PN;"
DoCmd.RunSQL strSQL
The SQL string seems to be OK but I get the error "An action query cannot be used as a row source" when it goes to DoCmd.RunSQL strSQL.
How can I get it to work? Any ideas?
Dim strSQL As String
strSQL = "INSERT INTO TempTable ( PN ) SELECT [TBL-PN].PN FROM [TBL-PN] _ WHERE ((([TBL-PN].PN) Like 'c6*')) GROUP BY [TBL-PN].PN;"
DoCmd.RunSQL strSQL
The SQL string seems to be OK but I get the error "An action query cannot be used as a row source" when it goes to DoCmd.RunSQL strSQL.
How can I get it to work? Any ideas?