Relationships with Lookup fields

D

DaveB

Is it ok to have relationships with fields that are
linked to another table after one of the fields have a
lookup table in it?
I have a table named "customers" with areacode and prefix
fields. I also have a table named "prefixes with city
info" that I have the prefix field linked to by a lookup
table. The areacode and prefix are also the primary key
in that table. I tried to establish a relationship using
the primary keys with another table. When I did this it
changed all of my prefixes on my table and on my form to
the area code.
I have three books on MS Access; Step by Step, Inside
Out, and Access 2002 Visual Basic. So if you would like
to just refer to a page number that would be great.
 
J

John Vinson

Is it ok to have relationships with fields that are
linked to another table after one of the fields have a
lookup table in it?

A Lookup field creates a relationship (between the table containing
the lookup field and the lookup table) ALREADY.

The Lookup field type is generally not considered with much esteem by
developers. See http://www.mvps.org/access/lookupfields.htm for a
critique. In particular, the lookup field CONCEALS the actual content
of the table from view, behind the looked-up value; it also creates a
new relationship between the tables even if such a relationship
already exist.
I have a table named "customers" with areacode and prefix
fields. I also have a table named "prefixes with city
info" that I have the prefix field linked to by a lookup
table. The areacode and prefix are also the primary key
in that table. I tried to establish a relationship using
the primary keys with another table. When I did this it
changed all of my prefixes on my table and on my form to
the area code.

No, it didn't. It changed WHAT YOU SEE in the table to the looked-up
value; it didn't change the content of your table. If you change the
Lookup property of this field from Combo Box to Textbox you'll see
what's actually there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top