Here's how I do it. Every table I create gets a field called EditLock, Boolean.
The following function is added to a database module and is called in the OnCurrent event of every appropriate form. It will disable editing for the form rather than for every control. Set the field EditLock to true when you no longer want to allow editing for that record, for instance when it is approved.
I have a similar setup for DeleteLock.
Public Function SetEditLock(frm As Form)
On Error GoTo Err_SetEditLock
'toggle form edits based on whether record shouldn't be edited/deleted
If frm!EditLock Then
frm.AllowEdits = False
Else
frm.AllowEdits = True
End If
Exit_SetEditLock:
On Error Resume Next
Exit Function
Err_SetEditLock:
Select Case Err
Case 0 'insert Errors you wish to ignore here
Resume Next
Case 94, 2465
frm.AllowEdits = True
Resume Exit_SetEditLock:
Case Else 'All other errors will trap
Beep
MsgBox Err.Number & "; " & Err.Description, , "Error in function basFramework.SetEditLock"
Resume Exit_SetEditLock
End Select
Resume 0 'FOR TROUBLESHOOTING
End Function
"The Key, The Whole Key, and Nothing But The Key, So Help Me Codd!"