ERROR 3113 MODULEID NOT UPDATABLE

ignasius Ukaoha
ignasius Ukaoha used Ask the Experts™
on
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
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
dovidfCEO

Commented:
What is the error?
dovidfCEO

Commented:
Is moduleid an autoincrement field? If so, that could be your problem.

Author

Commented:
ERROR 3113: Cannot update module ID 'Field' not Updatable
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

dovidfCEO

Commented:
If you are updating the record, the primary key should not be touched.
CEO
Commented:
Remove  "Set ModuleID=" & Me.MODULEID & _ from the statement and it should work.

Author

Commented:
Ok Thanks. it Just worked. I am so so happy
dovidfCEO

Commented:
You're welcome
dovidfCEO

Commented:
Please close this question and award me the points for answering your question.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial