Creating master/detail forms

From InterBase

Go Up to Working with Tables

A table component’s MasterSource and MasterFields properties can be used to establish one-to-many relationships between two tables.

The MasterSource property is used to specify a data source from which the table will get data for the master table. For instance, if you link two tables in a master/detail relationship, then the detail table can track the events occurring in the master table by specifying the master table’s data source component in this property.

The MasterFields property specifies the column(s) common to both tables used to establish the link. To link tables based on multiple column names, use a semicolon delimited list:

Table1.MasterFields := 'OrderNo;ItemNo';

To help create meaningful links between two tables, you can use the Field Link Designer. For more information about the Field Link Designer, see the Delphi User’s Guide.


Advance To: