Foreign Key?

Excel Is Evil!

New Member
Joined
Nov 12, 2002
Messages
11
I need to use the Foreign key along with the primary key to create a relationship table...
I know how the primamry key works, but where the heck is the Foreign key?!?!?!
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
It's right in the help file:

How do relationships work?
In the previous example, the fields in five tables must be coordinated so that they show information about the same order. This coordination is accomplished with relationships between tables. A relationship works by matching data in key fields — usually a field with the same name in both tables. In most cases, these matching fields are the primary key from one table, which provides a unique identifier for each record, and a foreign key in the other table. For example, employees can be associated with orders they're responsible for by creating a relationship between the Employees table and the Orders table using the EmployeeID fields.

Let me know if you can't understand it, I'll be happy to try to explain better.
 
Upvote 0
Dreamboat,

Thanks for replying, I understand how they(relationships) work but how do I put it into the table? Like the primary key, you click it and it sets it, but how do I "set" a field using the foreign key? I checked help but there is no explanation for where the actual "key" is located.
Any info would be appreciated.
 
Upvote 0
You don't have to actually set a Foreign Key (FK). A foreign key is just a field that will link to a Primary Key field. Usually, the foreign key can/does contain duplicates.

Dreamboat, what are you doing up so late? :biggrin:

-rh
 
Upvote 0
If you open the table in design view, then click on View and Indexes you will be able to set up indexes on any fields that you want.

Think this is what you mean.

Ken
 
Upvote 0

Forum statistics

Threads
1,221,487
Messages
6,160,114
Members
451,619
Latest member
KunalGandhi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top