Looking back at an old query, someone suggested that you could set the EDITABLE property on a field on a subform in the OnActivate and OnDeactivate triggers. This doesnt seem to work for me in V2.60A. Can it be made to work ?
Hi, One silly question? Where are you setting EDITABLE property? It is in OnActivate Trigger of Main Form or OnActivate Trigger of Sub Form?
Try the OnBeforeInput trigger, its meant for changing the editable property.
Hi Bob, You should be able to do this at on activate trigger. CurrForm.“Field name”.EDITABLE:=TRUE or FALSE; rgds, Anu
quote:
Originally posted by Rajeshj
Hi, One silly question? Where are you setting EDITABLE property? It is in OnActivate Trigger of Main Form or OnActivate Trigger of Sub Form?
I am trying to set it on individual fields on the subform, depending on the value in a field which controls the record type.
quote:
Originally posted by jwilder
Try the OnBeforeInput trigger, its meant for changing the editable property.
One of the fields is boolean and I dont get an OnBeforeInput trigger on that field.
quote:
Originally posted by Anuc
Hi Bob, You should be able to do this at on activate trigger. CurrForm.“Field name”.EDITABLE:=TRUE or FALSE; rgds, Anu
Hi Anu I put the following code on the OnActivate property … IF “Response Type” = “Response Type”::Numeric THEN BEGIN CurrForm.“Numeric Response”.EDITABLE := TRUE; END; … but the “Numeric Response” field remains editable.
Bob, this was maybe only a typo, but… If you set EDITABLE := TRUE; the field is supposed to remain editable [;)]
I played with this a bit and the behavior is little strange. You might want to experiment with this: Click the field “Numeric Response” that should be editable, it shows not editable. Click the field “Numeric Response” on another line, it shows editable even if it should not. Click another field of a line of which “Numeric Response” should be editable and then click “Numeric Response”, now it is editable.
quote:
Originally posted by xorph
Bob, this was maybe only a typo, but… If you set EDITABLE := TRUE; the field is supposed to remain editable [;)]
Ahh, if only it were that simple. I had the controls on the form set to not editable and change them to editable in code, as required.
Because the record type isnt editable within this form, I have got a satisfactory result by setting the editable property from the OnAfterGetRecord trigger. Thanks to you all for your contributions.[:)] Wish I knew how to turn on HTML smilies [:(]
And finally … I found that OnAfterValidate was a trigger that worked if the ‘type’ field was editable.