1-n relationship between tables in Access

The 1-n relationship is the type of relationship in which a record in the table may have multiple matching records in another table, but a record in the second table only has one matching record in the first table.

The relation 1-n is the most common type of relationship. In this relationship, a record in the table may have multiple matching records in another table, but a record in the second table only has one matching record in the first table.

To establish a 1-n relationship, you do the same as a 1-1 relationship.

1-n relationship between tables in Access Picture 11-n relationship between tables in Access Picture 1
Steps to create Relationships similar to 1-1 relationship

First, delete the old relationship by clicking the Clear Layout option on the Design tab .

1-n relationship between tables in Access Picture 21-n relationship between tables in Access Picture 2

Now you add a table about the work of each project  including CongviecID, DuAnID, TenCongviec, DoUutien, TinhTrang, MoTa, RightBatdau, Hanchot, File :

1-n relationship between tables in Access Picture 31-n relationship between tables in Access Picture 3
Adding new tables There are fields as shown in the image

Save the table as tblCongviec and go to Relationship in the Design tab .

1-n relationship between tables in Access Picture 41-n relationship between tables in Access Picture 4
Return to Relationship after Clear Layout as above step

Click the Show Table option to display the dialog box.

1-n relationship between tables in Access Picture 51-n relationship between tables in Access Picture 5
The Show Table dialog box appears

Select the tblDuAn and tblCongviec tables , click Add to add both tables to the desktop and close the Show Table dialog box .

1-n relationship between tables in Access Picture 61-n relationship between tables in Access Picture 6
Both tblDuAn and tblCongviec tables are added to the screen

To create a relationship between these two tables, use the mouse to click and hold the DuAnID field in the tblDuAn table , drag to the DuAnID field you want to connect to the tblCongviec table . When you release the mouse, Access will open the following window:

1-n relationship between tables in Access Picture 71-n relationship between tables in Access Picture 7
Drag the two DuAnID fields of the two tables together to display the Edit Relationships dialog box

Click on the Create button and now these two tables are connected, establishing a relationship with each other.

1-n relationship between tables in Access Picture 81-n relationship between tables in Access Picture 8
Two tables after establishing a relationship will show up like this

Previous article: 1-1 relationship between tables in ACCESS

Next lesson: 1-n relationship between tables in ACCESS

5 ★ | 1 Vote