Runtime Error 3134

Nocodexp

New member
Local time
Today, 15:22
Joined
Jul 10, 2014
Messages
4
Hi,
I was just following some coding from a tutorial and I've ran into the runtime error 3134 "Syntax error in INSERT INTO statement". I checked the coding and I believe everything is where it's at, however, the yellow arrow is pointed at the bottom line, where I guess where there is a fault?
Code:
CurrentDb.Execute "INSERT INTO VENDOR PERFORMANCE RECORD (QIRNO,PN,QCCODE,Description,VENDORName,INSDATE,PONO,Line,Release,Receipt,DATERECEIVED,LOTSIZE,SAMPLEQTY,REJECTQTY,INSPECTOR,TOTREJECTED,QCCOMMENTS,Rejected,NCRNO,INSLOCATION) " & _
    "VALUES(" & Me.txtQIR & ",'" & Me.cboPN & "','" & _
    Me.QCCode & "','" & Me.Description & "','" & Me.cboVendor & "','" & Me.DATE & "','" & Me.RIP_NO & "','" & Me.Text127 & "','" & _
    Me.Text129 & "','" & Me.Text131 & "','" & Me.DATE_RECEIVED & "','" & Me.LOT_SIZE & "','" & Me.SAMPLE_QTY & "','" & Me.REJECT_QTY & _
    "','" & Me.Inspector & "','" & Me.REJECT_QTY & "','" & Me.txtComments & "','" & Me.Total_Quantity_Rejected & "','" & Me.Text66 & "','" & _
    Me.txtINSLOC & "')"

Don't mind my naming conventions, these are just placeholders until I get this fixed.
Any help would be appreciated :)
 
Also by the names, the fields
LOTSIZE, SAMPLEQTY, REJECTQTY, TOTREJECTED
would appear to be numeric


If so, remove the single quotes around the data being inserted.
 
Date as well as Description and Line are reserved words. May or may not be an issue in this situation, can be in others. Enclose field names in []. Advise not to use reserved words as names for anything. http://allenbrowne.com/AppIssueBadWord.html#D
 

Users who are viewing this thread

Back
Top Bottom