Form Events Handling using AutoScript
Those procedures are put into the Form's AutoScript section
Form_Start ( form_id )
Call this procedure at the opening of the Form. All data has been load by default. The form_id is the handle of the Form.
Form_End ( uvalue )
Call this procedure after the Form has been closed by saving the data (append, edit or delete). The uvalue contains the unique field's value after the posting of the Form
Call this procedure when we want to put some AutoScript just before the Form is displayed to the user.
Form_OpenFK_[fieldname] ( fkvalue, fkform )
Call this procedure to change the default behaviour of just opening the foreign key's Form by pressing the "related button". The fkvalue is the value of the foreign key and fkform is the form of the related record (for witch the foreign key is the "unique key"
[editboxname]_OnChange ( value )
Call this procedure just after the changing of the value of the editbox with name [editboxname]
This procedure is used in forms that open in browsing mode. It is used in order to change the default list loading behavior in the filtering windows. The code below gives an example of its usage:
start_sql "*" "KOSMOS"
SELECT FIELD1 FROM TABLE1
q = QueryByName()
count = TRecordCount(q)
for i = 1 to count
val = TGetFld(q,"FIELD1")