How to insert ADO Recordset into MS Access Table
insert, ms-access, ms-access-2010, vba
Solution
If the type fields in your table `tblSummary_Appl_Usage_score` are numbers, use this:
DoCmd.RunSQL "INSERT INTO tblSummary_Appl_Usage_score VALUES (" & rs![Configuration] & "," & rs![User Input / Output] & ")"
If the type is string, use this:
DoCmd.RunSQL "INSERT INTO tblSummary_Appl_Usage_score VALUES (""" & rs![Configuration] & """,""" & rs![User Input / Output] & """)"
Problem
PROBLEM I want to insert the current recordset row into a MS Access table. I am currently getting this error ``` Syntax error (missing operator) in query expression 'rs[columnname]' ``` CODE Here is my current code, I am trying to grab all the columns and insert them into a new table. ``` DoCmd.RunSQL "INSERT INTO tblSummary_Appl_Usage_score VALUES (rs[Configuration], rs[User Input / Output])" ``` I am not quite sure what i am missing.