SQL update table from another table
- by LtDan
Using SQL in Access, trying to "Update" a table, with the user name, from another table.
The 3rd line below (SQLnm2...) says error-2465 cant find field '|'.
I've tried changing the expression many ways but no success.
Any assistance would be greatly appreciated.
Dim SQLnm As String
Dim SQLnm2 As String
SQLnm2 = SQLnm2 & "', '" & [Employees]![NBK] & "');"
SQLnm = " Update tbl_DateTracking SET NBK = "
SQLnm = SQLnm & "'" & SQLnm2 & "' WHERE "
SQLnm = SQLnm & "CaseId = '" & CaseId & "' AND OCC_Scenario = '" & OCC_Scenario & "';"
DoCmd.RunSQL SQLnm