Dave has attended:
No courses
Microsoft Access Primary and Foreign keys
Hi,
What are the Primary and Foreign keys and how are they used within Microsoft access.
Thanks
David
RE: Microsoft Access Primary and Foreign keys
Hi Dave
Microsoft Access contains primary and foreign keys. Your primary key should be assigned when you create your tables. This needs to be a unique identifier which will never contain duplicates. The foreign key is a field in another table that the primary key links to. For example:
You have a Microsoft Access database with table 1, table 2 and table 3. Table 1 has the fields 1,2 and 3, Table 2 has the field 4,5 and 1 and Table 3 has the fields 6,7 and 1. In table 1, the primary key is field 1. When you want to create the relationship in Microsoft Access, you drag field 1 from table one to field 1 in table 2 and then from table 1 to table 3. This now makes field 1 in table 2 and 3 foreign keys.
Hope this helps
David