Private Sub cmdSendOrder_Click()
'add data to table
CurrentDb.Execute "INSERT INTO OrderSummary(OrderNumber, SupplierCode, DateOrdered, EmployeeNumber) " & _
" VALUES (" & Me.txtOrderNumber & "','" & Me.cboSupplierCodeO & "','" & Me.txtDateO & "','" & Me.txtEmployeeO & "') "
'refresh data on list of form
OrderSummarySub.Form.Requery
End Sub
我的代码遇到运行时错误,说它在某些查询表达式中有语法错误(缺少运算符)。我很确定我上面的名字是正确的。
答案 0 :(得分:1)
您在Me.txtOrderNumber之前缺少第一个单引号:
"INSERT INTO OrderSummary(...) VALUES ('" & ...