How to Add Foreign Key in MS Access



Guide

  1. Launch Microsoft Access and open the database where you want to add the foreign key. Ensure you have two tables.

  2. Go to the 'Database Tools' tab in the ribbon.

  3. Click on 'Relationships'.

  4. In the 'Relationships' window, add both the parent and child tables to the window by clicking 'Add Selected Tables'.

  5. Drag the primary key field from the parent table and drop it onto the corresponding field in the child table.

  6. The Edit Relationships dialog box will appear. Verify that the fields match correctly

  7. Select 'Enforce Referential Integrity' to ensure that you cannot enter a value in the child table that doesn't exist in the parent table.

  8. Click 'Create' to establish the relationship.

  9. Save the relationships by clicking 'Save'.

🚀

Create your first interactive demo in minutes

No credit card required • Start building today

Start free

    This website uses cookies to enhance the user experience.

    AcceptDecline