Question re DoCmd.RunSQL "insert into"

J

JDB

I am trying to append data from a query into a table and am getting an
error 3134 "Syntax error in INSERT INTO statement;

Here is the code which uses a select query;

DoCmd.RunSQL "INSERT INTO tbl_data_RndFish * FROM
qry_Append_tbl_data_RndFish_Test;"


I am trying to replace this code which works well;

The following codes uses an append query

With DoCmd
.OpenQuery "qry_Append_tbl_data_RndFish", acViewNormal, acEdit
.Close acQuery, "qry_Append_tbl_data_RndFish"
End With

Thanks for any help

JDB
 
J

JDB

Excellent; works well.
Thanks for your prompt suggestion and help.
I just copied the code from somewhere else and must have missed
something.

JDB
 

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

Top