In the When Expression box, enter a logical expression that must be true before a field can be edited. Normally, you enter either:
· Logical Expression: A logical expression that evaluates to True or False.
· Function: A call to a user-defined function that returns True or False.
If you’re using a function, you can create your function from the Code page of the Visual FoxPro Project Manager.
When a form is displayed, the focus will not go on a field whose When expression evaluates to false.
The VPM Enterprise data control classes already contain a logical expression in the When event. You can view the code in the When event by opening a data control (for example, textbox_) in the VPMCTRLS class library in the Visual FoxPro Class Designer. You can use the Class Browser or Project Manager options on the VPM Enterprise Tools menu to open a class.
The When expression you enter in the When field property does not replace the existing When event code. It is added to it.