Hi
I created a form in access which has multiple fields.I have locked the rows to prevent edit or delete after inserting the record by means of allowedits and allowdelete properties of the form.
How ever i need to change a field alone after insertion.Hence i wrote a piece of code in that control's key press event stating ,Raising the input box and getting the value and then im updating that field.
But after updating that field the entire record went to editable mode after i wrote the following code.
Code:
a = InputBox("Enter the STATUS", "Option")
Set db = CurrentDb()
dsql = "UPDATE tbl_PaperTeam SET tbl_PaperTeam.Status = '" & a & "' WHERE tbl_PaperTeam.ID=" & txtID & ""
db.Execute dsql, dbFailOnError
Set db = Nothing
MsgBox "Status Updated", vbCritical + vbOKOnly, "Error"
Me.AllowEdits = No
After i executed the above code.all fields went to editable mode
So please assist me what should be done to make the entire record read only
after updating a single field