ignasius Ukaoha
asked on
ERROR 3113 MODULEID NOT UPDATABLE
I am trying to run an update but getting this error please help me resolves this. Thanks
The Code
CurrentDb.Execute "UPDATE tblmodules " & _
"Set ModuleID=" & Me.MODULEID & _
",CourseCode='" & Me.COURSECODE.Value & "'" & _
",CourseTitle='" & Me.COURSETITLE.Value & "'" & _
",ModuleNo='" & Me.MODULENO.Value & "'" & _
",StartDate='" & Me.StartDate.Value & "'" & _
",EndDate='" & Me.EndDate.Value & "'" & _
",StudyCentre='" & Me.StudyCentre.Value & "'" & _
",Facilitator='" & Me.Facilitator.Value & "'" & _
"WHERE ModuleID =" & Me.MODULEID.Tag
The Code
CurrentDb.Execute "UPDATE tblmodules " & _
"Set ModuleID=" & Me.MODULEID & _
",CourseCode='" & Me.COURSECODE.Value & "'" & _
",CourseTitle='" & Me.COURSETITLE.Value & "'" & _
",ModuleNo='" & Me.MODULENO.Value & "'" & _
",StartDate='" & Me.StartDate.Value & "'" & _
",EndDate='" & Me.EndDate.Value & "'" & _
",StudyCentre='" & Me.StudyCentre.Value & "'" & _
",Facilitator='" & Me.Facilitator.Value & "'" & _
"WHERE ModuleID =" & Me.MODULEID.Tag
What is the error?
Is moduleid an autoincrement field? If so, that could be your problem.
ASKER
ERROR 3113: Cannot update module ID 'Field' not Updatable
If you are updating the record, the primary key should not be touched.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Ok Thanks. it Just worked. I am so so happy
You're welcome
Please close this question and award me the points for answering your question.