A
Ac
Hi,
I would like to insert the data into the Fields (FixedRate, VolumePumped,
TimeStep, MudIntoAnnulus, GasIntoAnnulus) in a recode (row) of a table named
ResultData, all data are calculated (A7, B7, C7, D7, E7) and have the data
type as Double; following is the code for the inserting data into the recode,
but I got the error message said “Syntax error in INSERT INTO statement.
Could someone point out what is wrong for the code? Or should I use ADDNEW
instead of INSERT INTO? What is the ADDNEW syntax? Thanks!
Dim rs As DAO.Recordset
Dim fld As DAO.Field
Set rs = CurrentDb.OpenRecordset("ChartData")
For Each fld In rs.Fields
DoCmd.RunSQL "INSERT INTO ResultData (FixedRate, VolumePumped, TimeStep,
MudIntoAnnulus, GasIntoAnnulus,) VALUS ( & A7, B7, C7, D7, E7 & )"
Next fld
I would like to insert the data into the Fields (FixedRate, VolumePumped,
TimeStep, MudIntoAnnulus, GasIntoAnnulus) in a recode (row) of a table named
ResultData, all data are calculated (A7, B7, C7, D7, E7) and have the data
type as Double; following is the code for the inserting data into the recode,
but I got the error message said “Syntax error in INSERT INTO statement.
Could someone point out what is wrong for the code? Or should I use ADDNEW
instead of INSERT INTO? What is the ADDNEW syntax? Thanks!
Dim rs As DAO.Recordset
Dim fld As DAO.Field
Set rs = CurrentDb.OpenRecordset("ChartData")
For Each fld In rs.Fields
DoCmd.RunSQL "INSERT INTO ResultData (FixedRate, VolumePumped, TimeStep,
MudIntoAnnulus, GasIntoAnnulus,) VALUS ( & A7, B7, C7, D7, E7 & )"
Next fld