Getting "Run-time error '3134': Syntax error in INSERT INTO statement":
Code:
Private Sub butAdd_Click()
'Insert vs Update options
If Me.txtComponent.Tag & "" = "" Then
'add, clear form, and refresh
CurrentDb.Execute "INSERT INTO EntryFormTable(Assembly, Component, Description, AssemblyQty, UOM, QtyA, QtyB, QtyC, PriceA, PriceB, PriceC) " & _
" VALUES('" & Me.txtAssembly & "','" & Me.txtComponent & "','" & Me.txtDescription & "'," & Me.numAssemblyQty & ",'" & Me.txtUOM & "'," & Me.numQtyA & "," & _
Me.numQtyB & "," & Me.numQtyC & "," & Me.dbPriceA & "," & Me.dbPriceB & "," & Me.dbPriceC & ")"
Else
CurrentDb.Execute "UPDATE EntryFormTable " & _
" SET Assembly='" & Me.txtAssembly & "'" & _
", Component='" & Me.txtComponent & "'" & _
", Description='" & Me.txtDescription & "'" & _
", AssemblyQty=" & Me.numAssemblyQty & "" & _
", UOM='" & Me.txtUOM & "'" & _
", QtyA=" & Me.numQtyA & "" & _
", QtyB=" & Me.numQtyB & "" & _
", QtyC=" & Me.numQtyC & "" & _
", PriceA=" & Me.dbPriceA & "" & _
", PriceB=" & Me.dbPriceB & "" & _
", PriceC=" & Me.dbPriceC & "" & _
" WHERE Component='" & Me.frmEntrySub!Component & "'"
End If
butClear_Click
frmEntrySub.Form.Requery
End Sub