OBJECT.ALLOW_CHANGE Function
Syntax
Arguments
- Allow
Optional. Default = .F. (FALSE)
- .F. = Data can not be edited.
- .T. = Data can be edited.
Description
Specifies if data can be edited.
Discussion
The <OBJECT>.ALLOW_CHANGE() method applies to:
- Browses (for <OBJECT> use either the <BROWSE> pointer or the name of the browse)
- Forms (for <OBJECT> use either the <FORM> pointer or the name of the form)
The <OBJECT>.ALLOW_CHANGE() method sets the Allow Changes setting for a layout. However, the user can press the F3 key or select the Allow Edits menu entry to allow editing.
Example
This script turns off modeless data entry for a form. The script is attached to the form's OnFetch Event.
This.allow_change(.F.)
To allow editing, the form has a button with this script:
parentform.allow_change(.T.)
Note : Alternatively, you can also set a form's RESTRICT_CHANGE and RESTRICT_ENTER properties. If these properties are set to .T., the user cannot edit data, and cannot override the setting by selecting the Form > Allow Edits menu command. Note : To find out what the status is of a form's Allow Changes setting, use the ALLOW_EDITING() function.
Limitations
Desktop applications only.
See Also