Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do Relationships work in Access??

Status
Not open for further replies.

Quickchange

Technical User
Jan 31, 2000
4
FR
When two tables are related does that mean that you can reference all fields in both tables or only like fields or only the fields in the relationship? Specifically, I am wondering if I have two tables lets say Table A and Table B and I create a relationship one to many on a Number field in each table are other fields besides the number field in each table related? Are Text fields related by this realationship?? Also is it ever necessary to create several relationships between the same tables? In this case create a relationship between Table A and B on Number fields then turn around and create a relationship One to many on a Text field.<br>
<br>
Thanks
 
A relation ship just determines how one (or more)table(s) is related to another.<br>
So if you have &quot;customers&quot; in Table A and &quot;Invoices&quot; in Table B<br>
then the relationship is on CUSTID say<br>
<br>
the customers table can have these fields<br>
CUSTID<br>
NAME<br>
ADDRESS<br>
CITY<br>
etc.<br>
<br>
Invoices table has<br>
INVOICE NUM<br>
CUSTID<br>
DATE<br>
PART NUMBER<br>
PRICE<br>
etc.<br>
<br>
So the realtionship is on one field CUSTID<br>
Now to find say cusotmer number 7865 invoices<br>
you create a query which should see the realtionship already set up and draw a line from one to the other on CUSTID<br>
Add the fields from customer table to the grid<br>
and add the fields from Invoices to the grid and you will see a total number of records that match both tables.<br>
or are &quot;related&quot;<br>
<br>
OK this is brief but you get the idea.<br>
<br>

 
Please use your Help option in Access. Look under relationships. There are examples as well as explanations. In most cases you should not have relationships between multiple fields in tables. In general, that would be a possible indicator of redundant data, which is a major problem (see normalization under Help).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top