COMPILE FORM Command

See Also

Compiles one or more Form objects.

Syntax

COMPILE FORM FormName | cFileSkeleton [ALL]

Arguments

FormName

Specifies the name of the form to compile.

cFileSkeleton

Specifies a subset of form files to compile. cFileSkeleton is a file specification skeleton that supports wildcards. For example, to compile all Form objects that begin with A, use the following command:

COMPILE FORM A*

ALL

Compiles all records for all Visual FoxPro platforms in the Form table. If you omit ALL, only records for the current Visual FoxPro platform are compiled.

Remarks

Forms are automatically compiled when they are saved in the Form Designer. Use COMPILE FORM to compile a form outside the Form Designer.

Form source code is stored in memo fields in the Form table. COMPILE FORM compiles these memo fields into object code that is stored in an additional memo field. The object code in this additional field is executed when you issue DO FORM.

Note that if a form has an include (.H) file and the include file is moved from its original directory, a compilation error occurs and is listed in the .err error log file. The form can be run, but cannot be saved if modified until you correct the path to the include file. To correct the path to the include file, open the form with MODIFY FORM, choose Include File from the Form menu, and specify the include file with its new path in the Include File dialog box.