我有將數據寫入到鏈接SQL表,其中一項功能是編輯功能,但是當我做了修改,並重新提交數據出現錯誤形式更新到鏈接的SQL表
Run Time Error 3073 Operation Must Use an Updateable Query
我已經使用這個代碼之前,正常的Access表中存放在數據庫的窗體是,它工作正常,我需要做一些改動的代碼,因爲它正在編輯鏈接的SQL表上的數據?代碼如下?
CurrentDb.Execute "UPDATE dbo_AC_CD_Data_Form " & _
"SET EmployeeID='" & Me.txtEmpID & "'" & _
", EmployeeName='" & Me.txtEmpName & "'" & _
", Gender='" & Me.cboGender & "'" & _
", EEOC='" & Me.cboEEOC & "'" & _
", ReadinessLevel='" & Me.cboReadyLvl & "'" & _
", Division='" & Me.cboDivision & "'" & _
", Center='" & Me.txtCenter & "'" & _
", EmployeeFeedback='" & Me.txtFeedback & "'" & _
", DevelopmentForEmployee='" & Me.txtDevelopment & "'" & _
", Justification='" & Me.txtJustification & "'" & _
", Changed ='" & Me.cboChanged & "'" & _
" WHERE EmployeeID='" & Me.txtEmpID & "'"
如果Access無法確定主鍵,則鏈接表將爲只讀。嘗試在Access中的設計模式下打開表格並查看是否有主鍵。 – mnieto
沒有主鍵 – user2119980