Reputation: 17
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
My code gets a run-time error saying it has a syntax error (missing operator) in certain query expressions. I'm pretty sure the names I put above were correct.
Upvotes: 0
Views: 2262
Reputation: 2917
You are missing your first single quote before Me.txtOrderNumber:
"INSERT INTO OrderSummary(...) VALUES ('" & ...
Upvotes: 1