LiveDemo - Open-source alternative to Storylane, Navattic, and Arcade | Product Hunt

How to Add Foreign Key in MS Access

  • George Apostolov


    How to Add Foreign Key in MS Access: step-by-step 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'.

    Quick answer: To add a foreign key in Microsoft Access, open your database and go to the Database Tools tab. Click Relationships, add the parent and child tables, drag the primary key to the child field, verify the fields in the dialog box, select Enforce Referential Integrity, click Create, and save.

    About this tutorial

    Establish table relationships and enforce referential integrity within the app by linking primary and foreign key fields. This guide shows how to add Foreign Key in MS Access in 9 steps, starting with "Launch Microsoft Access and open the database where you want to add the foreign key. En..." and finishing with "Save the relationships by clicking 'Save'". The interactive demo above is a click-through copy of the real product interface, so you can rehearse each step before doing it in your own account.

    Frequently asked questions

    How many steps does it take to add Foreign Key in MS Access?

    9 steps. Each one is listed in order above, and the demo highlights exactly where to click.

    Can I try it without changing my own account?

    Yes. Clicking through the demo doesn't touch your data or settings. Once you know the flow, repeat it in your own workspace.

    LiveDemo - Open-source alternative to Storylane, Navattic, and Arcade | Product Hunt
    🚀

    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