MS Access - One-to-One Relationship
Ms access tutorial
MS Access - One-to-one relationship
Now let's understand the one-to-one relationship in MS Access. This relationship is used to relate a record from one table to one and only one record in another table.
Now let's move on to the Database Tools tab.
Click on the Relations button.
Select tblEmployees and tblHRData then click on the Add button to add them to our view then close the Show table .
To create a relation between these two tables use the mouse and click and hold the EmployeeID field of tblEmployees and drag and drop this field on the field we want to link by hovering the mouse over EmployeeID from tblHRDat a . When you release the mouse button, Access will open the following window -
The window above connects EmployeeID of tblEmployees to EmployeeID of tblHRData. Now let's click on the Create button and now these two tables are linked.
The relationship is now saved automatically and there is no real need to click the Save button. Now that we have created the most basic relationships, let's go over to the table to see what happened with that relationship.
Let's open the tblEmployees table.
Here on the left side of each record you will see a little more sign by default. When you create a relation, Access automatically adds a sub-datasheet to this table.
Let's click on the plus sign and you will see that the information for that record is on the tblHRData table.
Click on the Save icon and open tblHRData and you will see that the data we entered is already there.