Hello,
I keep getting a syntax error on the following update statement. All of the fields are spelt correctly.
appreciate any help!
Thanks
I keep getting a syntax error on the following update statement. All of the fields are spelt correctly.
Code:
Private Sub Command133_Click()
CurrentDb.Execute "UPDATE tblPlannedRoles" _
& "SET [2020] = '" & Me.rtxt2020 & "', [2021] = '" & Me.rtxt2021 & "', [2022] = '" & Me.rtxt2022 & "', [2023] = '" & Me.rtxt2023 & "', [2024] = '" & Me.rtxt2024 & "', [2025] = '" & Me.rtxt2025 & "', [2026] = '" & Me.rtxt2026 & "', [2027] = '" & Me.rtxt2027 & "', [2028] = '" & Me.rtxt2028 & "', [2029] = '" & Me.rtxt2029 & "', [2030] = '" & Me.rtxt2030 & "'" _
& "WHERE [Role Title] = '" & Me.roletitle & "' AND [Country] = '" & Me.Country & "' AND [Employer] = '" & Me.Employer & "' AND [Sub Function] = '" & Me.subfunction & "' AND [Job Family] = '" & Me.[JobFamily] & "' AND [Grade / Level] = '" & Me.grade & "'"
End Sub
appreciate any help!
Thanks