Now we want to tell our Access Database that there is a relationship between Employee and Asset
Close all the panels with showing the tables (this makes sure the tables structure is saved
In the Ribbon bar, under Database Tools choose Relationships
From the left hand object panel drag tblEmployee and tblAsset
Line up the EmpID for both tables (if you do this your diagrams will be less messy)
Click and drag from tblEmployee.EmpID to tblAsset.EmpID (make sure you do this the right way round)
The "Edit-Relationships" Popup will show. Click on Enforce Referential Integrity. This means that you cannot enter an Asset unless there is an Employee allocated.
(Then click [Create])
The following Relationship diagram showing our 1-many relationship wll be created.
Note If you have previously entered an employee (EmpID) into the Asset table that does NOT exist in the Employee table you will not be able to enforce referential integrity.
If you try to add a new record into the Asset table with an invalid EmpID (EmpID does not exist in the Employee table), Access will not allow this.