PDA

View Full Version : HELP! Run-time error '3034' Syntax error in insert into



cathie
10-21-2017, 03:36 PM
Can anyone eyeball something that I can't see???


MySql = "INSERT INTO All2 (LoanType, Street, Unit, City, State, Zip, Borrower, Vendor, DateRecd, Wholesaler, Processed, " & _ "UploadID, Result, Latitude, Longitude, ZillowID, Zestimate, ZRestimate, Zerror) VALUE " & _
"('" & LoanType & "','" & Street & "','" & Unit & "','" & City & "','" & State & "','" & Zip & _
"','" & Borrower & "'," & Vendor & ",#" & Format(DateRcvd, "mm/dd/yyyy") & "#," & Wholesaler & "," & Processed & _
"," & UploadID & "," & Result & ",'" & Latitude & "','" & Longitude & "','" & ZillowID & _
"'," & Zestimate & "," & ZRestimate & ",'" & ZError & "')"
Debug.Print MySql
CurrentDb.Execute MySql, dbFailOnError




Debug.Print result = "INSERT INTO All2 (LoanType, Street, Unit, City, State, Zip, Borrower, Vendor, DateRecd, Wholesaler, Processed, UploadID, Result, Latitude, Longitude, ZillowID, Zestimate, ZRestimate, Zerror) VALUE ('2nd NPN','1 Main Street','','Ijamsville','MD','21754','Lee Smith',123,#10/01/2017#,,1,568,1,'39.31054','-77.330942','36889999',477935.00,2478.00,'')"

OBP
10-22-2017, 01:12 AM
The only obvious thing that I can see is that there are 2 commas after the second #.


Wouldn't it be easier to use a Recordset to transfer this data in to the table as it is manipulated in Excel?

cathie
10-22-2017, 11:21 AM
Thank you for the assist! :) I got it working...