Check SQL

  • Thread starter Thread starter Richard
  • Start date Start date
R

Richard

Hi

Appreciate if someone can check my sql for me. I keep getting the error
3134.

Thanks in advance
Richard

Syntax:

strSQL = "INSERT INTO Payment (PaymentId, PaymentType, CompanyId, " & _
"PaymentDate, ChequeNo, TotalAmount, BankSlipNo, EntryStamp, "
& _
"Memo, ReceiptId, ReceiptNo) VALUES (""" & Me.txtPaymentID &
""", " & _
"""" & Me.CmbPayType & """, """ & Me.txtCustomerId & """, " & _
"""" & Me.txtPaymentDate & """, """ & Me.txtchequeno & """, " &
_
"""" & Me.txtfeespaid & """, """ & Me.txtBankSlipNo & """, " &
_
"""" & Me.txtentrystamp & """, """ & Me.txtmemo & """, " & _
"""" & Me.txtreceiptid & """, & """ & Me.txtreceiptno & """"
 
Hi,
Without knowing the data types I'm only guessing here but...
Strings should be delimited with quotes, dates (PaymentDate?) with #
and numbers (CompanyId?) require no delimiters.

You've delimited *everything* with quotes.
 
Back
Top