People I am creating a button to add information to a table (tbCadastro), from the information entered in the form. To do this, create an SQL statement:
After filling out all the fields in the form and clicking the Save button, it generates an error: "Syntax error (operator missing) in query expression" Balance Return ""
This information (balance return, etc.) is inside a combo box, where the user selects when filling out the form.
Thanks!!
Private Sub cmdSalvar_Click()
CurrentDb.Execute "INSERT INTO tbCadastro(Requisição, Código, Cliente, CPF_CNPJ, ID_Cartao, ValorDisponivelCartao, ValorBrutoDevolucao, Tarifa, ValorLiquido, Motivo, Observacoes, DataPagamento, FormaPagamento, BancoCredito, AgenciaCredito, ContaCredito, BancoDebito, AgenciaDebito, ContaDebito)" & _
"VALUES(" & Me.Requisição & ",'" & Me.Cliente & "','" & Me.CPF_CNPJ & "','" & Me.ID_Cartao & "','" & Me.ValorDisponivelCartao & "','" & _
Me.Tarifa & "','" & Me.ValorBrutoDevolucao & "','" & Me.ValorLiquido & "','" & Me.Motivo & "','" & Me.Observacoes & "','" & _
Me.DataPagamento & "','" & Me.FormaPagamento & "','" & Me.BancoCredito & "','" & Me.AgenciaCredito & "','" & Me.ContaCredito & "','" & _
Me.BancoDebito & "','" & Me.AgenciaDebito & "','" & Me.Requisição & "',' & Me.ContaDebito & " ')"
End Sub
After filling out all the fields in the form and clicking the Save button, it generates an error: "Syntax error (operator missing) in query expression" Balance Return ""
This information (balance return, etc.) is inside a combo box, where the user selects when filling out the form.
Thanks!!