0

I am trying to add a query result to a table in MS Access 2010 by running a SQL statement, but I get a time-run error saying

Microsoft Access can not find the input table or query. make sure it exists and the name is spelled correctly.

This is my code, please help me to check where I am wrong.

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

Another question, can I use a datasheet form as input source in such condition?

Thanks

Jiangzhou

1 Answer 1

2
...,Consumption, FROM FormulaQuery"

there is some comma in plus ;)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.