A lookup table is used to display information from one table based on the value of a foreign-key field in another table. For example, consider a table of Orders in a sales database. Each record in the Orders table includes a CustomerID indicating which customer placed the order. The CustomerID is a foreign key pointing to a customer record in the Customers table. When presenting a list of Orders (from the Orders table) you may want to display the actual customers name, as opposed to the CustomerID. Since the customers name is in the customers table, and you are presenting data from the Orders table, you need to create a lookup table, which takes the CustomerID value in the Orders record, and uses that value to navigate the relationship and return the more readable, customer name. This concept is known as a lookup table.
Tasks illustrated in this walkthrough include:

Prerequisites
In order to complete this walkthrough, you need:

Creating a New Windows Application
To create the new Windows Application project
From the File menu, create a new project.
Name the project LookupTableWalkthrough.
Select Windows Application and click OK. For more information, see Creating Windows-Based Applications.
The LookupTableWalkthrough project is created and added to Solution Explorer.

Creating a New Data Source
To create the data source
On the Data menu, click Show Data Sources.
In the Data Sources window, select Add New Data Source to start the Data Source Configuration Wizard.
Select Database on the Choose a Data Source Type page, and then click Next.
On the Choose your Data Connection page do one of the following:
If a data connection to the Northwind sample database is available in the drop-down list, select it.
-or-
Select New Connection to launch the Add/Modify Connection dialog box. For more information, see Add/Modify Connection Dialog Box (General).
If your database requires a password, select the option to include sensitive data, and then click Next.
Click Next on the Save connection string to the Application Configuration file page.
Expand the Tables node on the Choose your Database Objects page.
Select the Customers and Orders tables, and then click Finish.
The NorthwindDataSet is added to your project and the two tables appear in the Data Sources window.

Creating Data-bound Controls on the Form
To create data-bound controls on the form

Creating the Lookup Table
You establish the lookup table by setting properties on the CustomerID combo box:
To create the lookup table functionality on the form

Running the Application
To run the application
Press F5.
Navigate through the orders and ensure that the CustomerID combo box displays the CompanyName for each order from the Customers table (as opposed to the CustomerID column in the Orders table).

Next Steps
Depending on your application requirements, there are several steps you may want to perform after creating a data-bound form. Some enhancements you could make to this walkthrough include:

See Also