Hi,
I have a form that users fill on a tablet PC, and the content is transferred overnight on a server if they have checked the "completed" checkbox on the form.
I don't want them to be able to modify the content once they have checked the checkbox (but it's ok if they uncheck it and then modify the content..).
At first, I've tried to do Me.AllowEdits = False when the checkbox state changes to true, but the problem is, the user is then unable to uncheck the "completed" check-box because allow edits is set to false.
I've found on a forum a good workaround, lock all controls (except the check-box):
That works well, but I have to go back to a previous record and then back to the current record to have the locked state applied to the controls. I've tried to add in the AfterUpdate event of the checkbox " If Me.Dirty Then Me.Dirty = False", but that doesn't work. I've also tried (in the same event) to add Me.Requery, but that brings the form back to the first record...
Any idea will be appreciated!
Thanks!
I have a form that users fill on a tablet PC, and the content is transferred overnight on a server if they have checked the "completed" checkbox on the form.
I don't want them to be able to modify the content once they have checked the checkbox (but it's ok if they uncheck it and then modify the content..).
At first, I've tried to do Me.AllowEdits = False when the checkbox state changes to true, but the problem is, the user is then unable to uncheck the "completed" check-box because allow edits is set to false.
I've found on a forum a good workaround, lock all controls (except the check-box):
Code:
Public Function LockControls(lockState As Boolean)
Dim oControl As Object
For Each oControl In Me.Controls
'Loop through the controls and set the value of the locked property
Me.Controls(oControl.Name).Locked = lockState
Next
Me.CompleteCheck.Locked = False
Any idea will be appreciated!
Thanks!