Modify dynamicly properties on subform

Hello I have a button on a form (This form as a tabuler subform. When i push this button the property EDITABLE change on a item from this subform. I use this syntaxe :CurrForm.LignesVente.FORM.AccesSaisiePrix; This code does run a modify function on the subform ‘lignesventes’. But when i push the button, this error message appair : I translate from french → The dynamic property EDITABLE can not be mofify in this contexte!! Thank you for your HELP SORRY for my english Didier

Put the push button in the subform with the code currform.(Name of the control).editable:=true or false

You also have to put the same code e.g. (currform.(Name of the control).editable:=true or false) in the OnOpenForm and in the OnAfterGetrecord triggers of the Subform. If you don’t and you scroll on throug the next record (form), the editable property will not hold up. Good Luck !!

Hello Thank you for your HELPS But i will put the button on the FORM and not on the SUBFORM. Didier

In the form you can change the property of the whole subform and not the property of a control in a this subform

Quel est le critère qui doit déterminer qu’un contrôle doit ou non être éditable?

Hi Didier, the expression in the function in your subform should be CurrForm.MyControl.EDITABLE(TRUE or FALSE); If you use the UPDATEEDITABLE-command instead … an error occurs.

You can also set the CurrForm.EDITABLE property in the OnActivate and OnDeactivate triggers for a field. This way you can make only one field editable, and you can also make it conditional on other things. Dan.

Thank you very much for your help. It works very good. Thank You Didier