Lookup vs. Related Fields
Once you've established a relationship between tables, you can choose between two methods for using the source data. With the first method, you use the Lookup function to copy the actual data from a field in the source table to a field in the current table. Alter natively, you can display the source data directly by placing the table's fields on a layout (or using them in a calculation) in the receiver table.If you choose Lookup, when you enter a value in the source table's match field, the data in the specified fields is copied into fields in the receiver table. Once you've copied the field contents, however, if the data in the source changes, the data in the receiver table won't update. This might be useful if, for example, you want to maintain the customer's shipping address at the time of the sale.If you choose to display the source data in the current table layouts without copying it, any changes made to the source will be reflected in the receiver table. The fields displayed in the layout are the actual fields in the source table, not a copy. If a customer moves and you update your records, all the entries in both databases will show the new address, no matter when the entries were originally made.
To create a Lookup field
1 .Open your current file and choose File > Define > Database (Control+Shift+D/Command+Shift+D). When the Define Database dialog box appears, click the Tables tab. Select the current table, then click the Fields tab.2 .Type a name for the first field, make it a text or number field(depending on what you need), and click Create.3 .Repeat step 2 for every field from the source table that you need to duplicate. These fields will hold the data that will be copied from the source table. Use the same field names for these destination fields that you used in the original source table.4 .When you've finished creating the new fields, double-click the first field name.5 .The Options dialog box appears with the Auto-Enter tab displayed. Check the "Looked-up value" check box (Figure 6.17). The Lookup dialog box opens.
Figure 6.17. Choose the Looked-up value option for fields to be filled in with data from the related table.

Figure 6.18. The source table for the lookup appears in the list of related tables.

Figure 6.19. Specify the field to be looked up in the source table.

To use related fields in a layout
1 .Go to the layout in which you want to display the related fields. Choose View > Layout Mode (Control+L/Command+L).2 .Drag the Field tool onto the layout to bring up the Specify Field dialog box.3 .From the drop-down menu above the field lists, choose the relationship you want to use (Figure 6.20).
Figure 6.20. When using fields from related tables, be sure to specify the table occurrence before choosing the field name.

Figure 6.21. Once you choose a different table, the field list display changes.

Figure 6.22. In Layout mode, related fields display with two colons in front of their name.
[View full size image]
