John Vinson said:
ummm... not necessarily true. It's perfectly legitimate to have a
one-field table where the Primary Key is the actual value to be used;
the foreign key relationship is then not used to *find* the displayed
value but merely as a constraint to limit the choices to legitimate
values. For instance, a table of Categories could consist of just the
category name, and the parent table would have a text field for
Category.
Whether or not it is used as a constraint or in the find method, you still
need the extra category field. It is still needed in the lookup table to
describe the group to which the value belongs, or you can't limit the
choices to that group of values, or even show that group of values as a
choice. Normally a lookup table has only 2 fields, ID and text. With a
generic lookup, you will need 3 fields so that you can either use the 3rd
field as a constraint, or in the Order By clause to group the like items
together. I am still assuming that the Primary Key is still the actual value
used in the lookup.
Suppose you had lookups for both State and City stored in the same table
with 2 combo boxes on a form pointing to that table. How would you
distinguish "Washington" as a state in the state combo or city in the city
combo? Further, if you had a third combo with a name in it, how would you
know if "Washington" was a valid choice?
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access