Lock Form Detail with Button

jibb

Registered User.
Local time
Today, 00:32
Joined
Dec 1, 2011
Messages
93
Hello,

Is there any way I could lock all the items in my form detail with the click of a button? Or would each text box / combo need to be done individually?
 
No, you can set the AllowEdits property of the form with your button.
 
Paul's suggestion is by far the easiest way to do this, assuming that you did, indeed, want to lock all Textboxes, Comboboxes, Checkboxes, etc.

But keep in mind that once the button is clicked, all Controls on all Records will be Locked until you reset the AllowEdits Property to Yes. And once you reset it, all Records will then be Editable.

If you want the Lock to apply to certain Records, you'll need to use something like a Checkbox to mark Records that are to be Locked, and check this Control in the Form_Current event, and set the AllowEdits Property or not, depending on the Value of the Checkbox.

Also understand that by doing this you'll disable any Comboboxes that are used for Record Retrieval, Search functions, etc.

Linq ;0)>
 

Users who are viewing this thread

Back
Top Bottom