Hello
I have a subform and to edit the data I place it on the main form where changes can be made, then a cmd button is used to execute the docmd.runsql update query. However I am constantly getting an error msg (syntax error in UPDATE statement). Here is my code:
I have located the cause of the error to the line ["Date=" & editDatetxt & ", " & _ ] I have tried adding ' and # around editDatetxt but I keep getting the error. Assistance.date is formated as date/time (short date) and editDatetxt is also formatted to short date.
Any help greatly appreciated.
TIA
I have a subform and to edit the data I place it on the main form where changes can be made, then a cmd button is used to execute the docmd.runsql update query. However I am constantly getting an error msg (syntax error in UPDATE statement). Here is my code:
Code:
updateSQL = "UPDATE Assistance SET " & _ "Date =" & editDatetxt & ", " & _ "Assistance ='" & Me.aAssistancetxt & "', " & _ "Amount =" & Me.aAmounttxt & " " & _ "WHERE assistanceID =" & Me.aAIDtxt DoCmd.RunSQL updateSQL
Any help greatly appreciated.
TIA
Comment