How to insert ADO Recordset into MS Access Table

后端 未结 2 607
渐次进展
渐次进展 2020-12-31 18:00

PROBLEM

I want to insert the current recordset row into a MS Access table. I am currently getting this error

Syntax error (missing o         


        
2条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2020-12-31 18:54

    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] & """)"
    

提交回复
热议问题