query problems

G

geebee

I have the following query in code:

DoCmd.RunSQL "SELECT tbl_masterpop_new.[Loan Acct #] ,
tbl_masterpop_new.Status, tbl_masterpop_new.PopEnterDt FROM tbl_masterpop_new
UNION ALL SELECT tbl_masterpop.[Loan Acct #] , tbl_masterpop.Status,
tbl_masterpop.PopEnterDt into tbl_history FROM tbl_masterpop", -1

but i am getting an error message:

a runsql action requires an argument consisting of an SQL statement

how can i resolve this?
thanks in advance,
geebee
 
D

Douglas J Steele

You can only use RunSQL with Action queries (INSERT INTO, UPDATE, DELETE or
SELECT...INTO queries)

What are you hoping to be able to do by running the SELECT query?
 
Top