I am trying another insert statement
Debug.Print sql is giving me this output:
which I guess it is correct, however when the code reaches
CurrentDb.Execute sql
I am getting Runtime error 3134 Syntax error in Insert Into Statement...any ideas why?
Code:
sql = "INSERT INTO tblCaseInfo(NotaryRefNo, Volume, Title, ContractNo, DateOfCreation, Description, Subject Terms, Page/Folio, Language1, Language2, Language3, PlaceOfCreationNo, TypeOfContractNo)" & _
"VALUES(" & refNo & "," & Volume & ", " & Title & "," & ContractNo & ", '" & Format(DateOfCreation, "dd-mmm-yyyy") & "', " & Description & ", " & subjTerms & ", " & page & ", " & lan1 & ", " & lan2 & ", " & lan3 & ", " & PlaceOfCreationNo & ", " & TypeOfContractNo & ")"
Debug.Print sql is giving me this output:
Code:
INSERT INTO tblCaseInfo(NotaryRefNo, Volume, Title, ContractNo, DateOfCreation, Description, Subject Terms, Page/Folio, Language1, Language2, Language3, PlaceOfCreationNo, TypeOfContractNo)VALUES(451,1, test,1, '18-Jan-1818', test, test, 1-3, 1, 2, 4, 2, 1)
which I guess it is correct, however when the code reaches
CurrentDb.Execute sql
I am getting Runtime error 3134 Syntax error in Insert Into Statement...any ideas why?