Share this Page URL

Chapter 2. The Basics of Database Design > Creating a Lookup Field - Pg. 65

The Basics of Database Design 65 6. 7. 8. Notice the option to hide the key column. In the CampaignLanguage table, you'll see the name of the country and not the campaign ID. However, each campaign country will still be identified by its campaign ID in the database. Choosing from a list of the countries in the lookup field is easier than choosing from a list of ID numbers. Click Next. Enter Country as the label for the lookup field, and then click Finish. Click Yes to save the table. (As the message box indicates, you're required to save the table before the relationship between this table and the MarketingCampaigns table can be created.) Repeat steps 2 through 7 for the LanguageID field. In step 3, select Table:MarketingMaterials for the table. In step 4, select Language as the selected field. In step 6, enter Campaign Language for the field's label. The Table Design window should now look like this: 9. To see how the lookup fields work, click Datasheet View on the View menu. In the Country and CampaignLanguage fields, you can select from the lists that are populated with the values from the MarketingCampaigns and MarketingMaterials tables. If you want, enter a few records, which will become part of the records we view in later chapters. Close the table when you've finished.