The lock statement locks one or more window fields. A user won’t be able to modify a locked field until it’s unlocked with the unlock statement, or until the form or window containing the field is restarted.


lock {field} field_name {, field_name, field_name...}


field – An optional keyword identifyingfield_name as a field name.

field_name – The name of a field to be locked.


The lock statement prevents user input into a field. It operates much the same as the disable field statement, making the locked field appear with the same properties as if the field’s Editable property had been set to false using the Properties window.

The lock statement can’t be used in scrolling windows to selectively lock one or more fields on certain lines. However, it can be used before the fill window statement to lock one or more fields on all lines of the scrolling window.

Documentation Feedback