I am trying to update my tables, and this error occurs
Runtime error '-2147217900 (80040e14)':syn tax error in update statement only for the table Action types.This is the code
and where error occurs is in Bold
please not that all parameters have been set and the error doesnt occur when the caption is City or RNE Names.
Thank you.
Runtime error '-2147217900 (80040e14)':syn tax error in update statement only for the table Action types.This is the code
and where error occurs is in Bold
Code:
If frmAdd.Caption = " CITY " Then
StrSql = "UPDATE City SET CITY = '" & Text1.Text & "' WHERE CITY _
= '" & OldVal & "'"
CnEdit.Execute StrSql
ElseIf frmAdd.Caption = " TYPE OF ACTION " Then
StrSql = "UPDATE ActionTypes SET Action = '" & Text1.Text & "' _
WHERE Action = '" & OldVal & "'"
[B]CnEdit.Execute StrSql[/B]
ElseIf frmAdd.Caption = " RNE NAME " Then
StrSql = "UPDATE RNE_names SET RNEName = '" & Text1.Text & "' _
WHERE RNEName = '" & OldVal & "'"
CnEdit.Execute StrSql
End If
Thank you.
Comment