I want to have all of my textboxes and other fields in my form as read-only, but not greyed out, until a button is clicked, for example "Edit." What would be the best approach to doing this? Conditional Formatting? VBA?
Thanks.
I want to have all of my textboxes and other fields in my form as read-only, but not greyed out, until a button is clicked, for example "Edit." What would be the best approach to doing this? Conditional Formatting? VBA?
Thanks.
I'd probably set the AllowEdits property of the form.
I am looking into this as a possible way to prevent unintentional changes to data. I would like certain forms to be ready-only and then when the "Edit" button is clicked have a pop up window come up verifying that you want to make changes and then when yes is clicked, make all fields on the form editable. Would I have to apply the AllowEdits to each object in the form or would I be able to apply to all with VBA?
This is all you need:
Code:Private Sub Form_Current() Me.AllowEdits = False End SubCode:Private Sub EditButton_Click() Dim resp As Integer resp = MsgBox("Would You Like to Edit This Record?", vbYesNo + vbDefaultButton2) If resp = vbYes Then Me.AllowEdits = True End Sub
Moving to the next Record will lock the Form again.
Linq ;0)>
Thank you. That works perfectly.
Glad we could help!
Linq ;0)>