![]() |
Introduction to Relationships |
|
Lookup Fields |
|
Unbound Lookup Fields |
|
The fields we have been creating so far were classic text box fields that allow the user to simply type to create a value. Instead of letting the user type the values of a field, if you want, you can establish a list of values that are valid for a certain field. This would allow the user to simply select from that list. Such a field is called lookup field. The simplest type of lookup field consists of creating a list whose items you know at the time you are creating the database. For example, if a clerk must specify the gender of persons whose records she is creating, since there are only two genders, you can create a list that |
![]() |
|
contains only male and female items. Since there would not be suspicion of a new value, you can safely create such a list. The lookup list is provided through a combo box. To set or change a value in the field, the user can expand the combo box and select an item. The item selected in stored in the field and is stored as a string (as text)
Any of these actions would launch the Lookup Wizard. Since in this case you would be creating a known list, you should select the second radio button and proceed. |
|
|
|
|
|
Bound Lookup Fields |
|
As done with the simple lookup, you can create a field whose data would be selected from a list. As opposed to an unbound lookup fields whose values you can predict at the time you are creating a database, a bound lookup field is one whose values are not known in advance. The values for such a field become available as the database is growing. We mentioned earlier that tables could be linked to exchange information. Based on our illustration, a foreign key field from a table can be used to provide information to its table by |
![]() |
|
retrieving it from the originating table. When creating such a relationship, you should know what table would be providing such information and how the relationship would be managed. |
|
|
|
|
MOUS Topics |
| S3 | Establish table relationships |
| S10 | Set primary keys |
| S13 | Modify tables using Design View |
| S14 | Use the Lookup Wizard |
| S33 | Establish relationships |
|
Exercises |
|
Watts A Loan |
|
|
Tenley Associates |
|
|
Yugo National Bank |
|
|
|
||
| Previous | Copyright © 2002-2007 FunctionX, Inc. | Next |
|
|
||