Specifies the name of a .QBE query or a table on which a form is based.

Property of

Form, SubForm

Description

Use view for form-based data handling with tables in work areas. When using the data objects, do not use view.

view determines which tables are automatically opened whenever the form is opened. You may specify a single table, or a .QBE query file. If you specify a single table, dBASE Plus internally issues CLOSE DATABASES to close all tables open in work areas (in the current workset) before opening the specified table in work area 1, in its natural or primary key order.

A .QBE file is a program file that is supposed to open one or more tables in a specific index order, and contains the appropriate Xbase DML commands such as SET RELATION and SET SKIP to create a multi-table view. In .QBE files generated by earlier versions of dBASE, the first command in the file is CLOSE DATABASES, so using a generated .QBE also closes all open tables.

The specified table is opened (or the .QBE is executed) immediately when the view property is assigned.

Instead of using the view property, you may open the necessary tables yourself. All tables containing fields that are dataLinked to controls on the form must be open when the form is instantiated; otherwise the dataLink properties will fail (because the specified fields cannot be found), causing an error.

If one form opens another form that is supposed to use the current record in the first form, you don’t want to set the view property in the second form, because instantiating that second form would close the tables used by the first form. This is a common situation where a form would use the current view, and not have anything assigned to its view property.

If a form does not have its own view, you may assign a designView property to the form so that the necessary tables are opened when you edit the form in the Form designer. The designView property has no effect when you actually run the form.