Question : Insert Into and syntax error

Experts, The below use to work until I added Me!WhyAmend.  It is a text field.  When I run it the error states:  Syntax error (missing operator) in query or expression 'test,'7/15/2010')'.  Look at the "focus here ^^^^^^^^^^" part below

Private Sub txtAmendedDate_AfterUpdate()

   Dim strSQL As String
 
  DoCmd.RunCommand acCmdSaveRecord
 
  strSQL = "INSERT INTO tblLCAmendHistory (fldDate, letterofcreditID, EndUserID, WhyAmend, AmendedDate) VALUES (#" & Format(Date, "m\/d\/yyyy") & "#," & Me!LetterOfCreditID & "," & Me!EndUserID & ",'" & Me!WhyAmend & ",'" & Me!txtAmendedDate & "')"
  '        focus here^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^          
  Debug.Print strSQL
 
  DoCmd.SetWarnings False
  DoCmd.RunSQL strSQL
  DoCmd.SetWarnings True
End Sub
 
screenprint
327753
 

Answer : Insert Into and syntax error

Missing single quote near Me!WhyAmend

strSQL = "INSERT INTO tblLCAmendHistory (fldDate, letterofcreditID, EndUserID, WhyAmend, AmendedDate) VALUES (#" & Format(Date, "m\/d\/yyyy") & "#," & Me!LetterOfCreditID & "," & Me!EndUserID & ",'" & Me!WhyAmend & "','" & Me!txtAmendedDate & "')"
Random Solutions  
 
programming4us programming4us