Link to home
Start Free TrialLog in
Avatar of didier20
didier20

asked on

How to set a table (fields) to not-editable?

On the Form there is a radio button (among others) that can be set to YES or NO.
Below this button is a table (Subform) which should be editable when the user select YES.
But the table should be not-editable when the user select NO.

When I knew in advance what the user select it would be easy because I could create another Subform.
But in this case the Form is opened with an editable table and if the selection NO, the table should turn to a not-editable table.
Does anybody know how to do it?
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

Do you mean you have many fields in a table in your form, each table cell has a field? Set the property of the YES/NO-field to Refresh fields on keyword change, and use the value of the YES/NO field in the hide-whens of the whole table.
Avatar of didier20
didier20

ASKER

Yes, the table has lots of fields.

I set the radio button field properties to "Refresh fields on keyword change"
The fields in the table (in the cells) has the following hide when formula: matrel="N"
matrel is the radio button field name.
But it doesn't work, the field in the cell isn't hided even if I save the form.

I guess there is something wrong with the "hide formula"
I've already tried this:
Field matrel := rb;
rb="N"


By the way: How can I give the radio button a default value?
What are the options you have for the radio button? If you have
    Y
    N
or
    Yes | Y
    No | N
or anything like that, then set the default value of the radio button as "N" (and NOT a plain N, which would mean the field with the name "N"!).

Fields do NOT have a hide-when formula... Paragraphs do, and a table cell is one or more paragraphs, depending on the number of newlines you entered in the cell. The hide-when formula could just be
    matrel="N"
But on the radio button there is no option like: Set the default value.
I want to set the default with "N" but where?

The hide formula doesn't work till now but I will try later again.
Pardon? It is not an option, if that's what you're looking for. In the Designer, you don't have a place to set the Default Value? Must be there... where all default formulas are to be entered for fields.
Sorry, I thought it is on the Field's property window.
I set following when it didn't work:
Not Related |"N"

But now it's ok, even the hiding.
I only wanted to hide the fields and leave the table (frame/cells) there.
Is it possible?
ASKER CERTIFIED SOLUTION
Avatar of Sjef Bosman
Sjef Bosman
Flag of France image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks,
It works.