我试图通过运行SQL语句将查询结果添加到MS Access 2010中的表,但是我得到一个时间错误说
Microsoft Access无法找到输入表或查询。确保它存在并且名称拼写正确。
这是我的代码,请帮我查一下我的错误。
Private Sub Command6_Click()
Dim strSql As String
strSql = "INSERT INTO test(ConsumedDate, FinishedProudct, ConsumedItem, ConsumptionQuantity, Unit), SELECT ProductDate, ProductCode, [Ingredient/Packaging material],Consumption, FROM FormulaQuery"
CurrentDb.Execute (strSql)
End Sub
另一个问题是,在这种情况下,我可以使用数据表格作为输入源吗?
由于
江州
答案 0 :(得分:2)
...,Consumption, FROM FormulaQuery"
加号中有一些逗号;)