• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 2. What Every Developer Needs to... > Working with the Lookup Feature

Working with the Lookup Feature

Using the Lookup Wizard, you can instruct a field to look up its values in another table or query or from a fixed list of values. You can also display the list of valid values in a combo or list box. A lookup is generally created from the foreign key (the “many” side) to the primary key (the “one” side) of a one-to-many relationship.

You can invoke the Lookup Wizard by selecting Lookup Wizard from the list of data types for the field. The first wizard dialog box asks whether you want to look up the values in a table or query or whether you want to input the values. I recommend that you always look up the values in a table or query; this makes your application easier to maintain. The second dialog box asks you to indicate the table or query used to look up the values. Select a table or query and click Next to open the third dialog box. This step of the Lookup Wizard asks you which field in the table or query will be used for the lookup. The fourth step of the Lookup Wizard asks you the sort order you want for your list. The fifth step, shown in Figure 2.21, gives you the opportunity to control the width of the columns in your combo or list box.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint