The field entry options can not be changed from a script.
But there are any number of ways to dynamically control access to a field.
Manage | Security can reference a "lock expression" for an entire table. If these fields are part of a separate table--perhaps linked in a one to one relationshp to the rest of the data, a script can change a value in a field to control whether the lock expression permits modifying data in these fields.
Script triggers such as OnObjectEnter and OnObjectModify can be used to control access to a field.
Validation rules can also use a "lock expression" to reject all changes to a given field if it is "locked" by setting a value in an associated field. This option permits users to attempt a change, but then forces them to revert the record when they do. That's not the most user friendly approach, but it will control access to that field on every layout in your database so it's often useful in combination with layout based access control methods as "insurance" against accidentally leaving a "loop hole" in your interface design that permits users to access the field when you don't.
You can also put two copies of your field on the layout, one with access denied and one that permits access. If you put them on different panels of a transparent tab control, a script can control which panel is in front and thus whether or not access to the field is permitted.
Thanks for reply,
I like the last option best with the tab control. that matches closer to the visable/enabled properties from Delphi which I am more used to.