Reputation: 15
I'd like to freeze/lock my form element, when my radio button checked.
Is it solve with one database row? Should I use VBA scripting to do this?
Upvotes: 0
Views: 60
Reputation: 55921
A radio button is not for checking; that's what a CheckBox is for.
So, use a CheckBox and this code in the AfterUpdate event of this:
Private Sub YourCheckBox_AfterUpdate()
Dim Frozen As Boolean
Frozen = Nz(Me!YourCheckBox.Value)
Me!YourTextBox.Locked = Frozen
Me!YourTextBox.Enabled = Not Frozen
End Sub
Upvotes: 1