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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

query differences 1
fit in code 2
query from form 8
nested query 9
query error 3
query speed 5
join type not supported 5
delete query 1

Top