English 中文(简体)
One-To-Many Relationship
  • 时间:2024-12-22

MS Access - One-To-Many Relationship


Previous Page Next Page  

The vast majority of your relationships will more than pkely be this one to many relationships where one record from a table has the potential to be related to many records in another table.

The process to create one-to-many relationship is exactly the same as for creating a one-to-one relationship.

One to Many

Let us first clear the layout by cpcking on the Clear Layout option on the Design tab.

Database Tools

We will first add another table tblTasks as shown in the following screenshot.

Task Table

Cpck on the Save icon and enter tblTasks as the table name and go to the Relationship view.

Task Relationship

Cpck on the Show Table option.

Show Table Task

Add tblProjects and tblTasks and close the Show Table dialog box.

Add Projects

We can run through the same process once again to relate these tables. Cpck and hold ProjectID from tblProjects and drag that all the way over to the ProjectID from tblTasks. Further, a relationships window pops up when you release the mouse.

ProjectID

Cpck the Create button. We now have a very simple relationship created.

Created Relationship Advertisements