Office 2007 - Access

Lesson 18: Subdatasheet

18/72 Lessons 

What are “SubDatasheets”?

A “SubDatasheet” is a datasheet that is nested within another datasheet and that contains data that is related or connected to the first datasheet.

In a “SubDatasheet”, we view or edit the related or linked data in a table.

To open a “SubDatasheet”, we first open our “Album” table in “Datasheet View”.
As you can see in the image below, all our records on the left side have a plus sign (+).

This is because we have a one-to-many relationship between two tables, namely the “Album” table and the “Song” table.
When we click on it, it opens the related “Song” table as a “SubDatasheet”.

To modify data in the “SubDatasheet” (in this case the “Song” table) , select the field and start typing.

We can even add new songs in the “SubDatasheet”.

As an example I want to add a song in the “SubDatasheet” of the “Album” table with the title ‘Ben’ for singer “Michael Jackson”.

To do this, first click on the (+) sign.

This opens the “SubDatasheet”, or in other words the “Song” table that is related to the “Album” table.

In the “Song” table, we enter six fields:

The first field “SongID” is automatically filled in, remember, automatic numbering.

In the second field we enter the title of the song, no problem I know.

The third field “SingerID” However, you can only know out of your memory, or when you lookup in the  “Lead Singer” table. I do not know from my memory, so I open the “Lead Singer” table and see what SingerID Michael Jackson has, that is 2.

The fourth field “Duration”, I can get it from the cover of the CD for sure.

The fifth field “Genre” and sixth “Date” can also be filled in the same way.

When we go look in the “Song” table, we see that the song we just entered, is automatically included.

Just click the “Refresh All” button in the “Ribbon”.

The “Refresh All” button consists of two parts, if you click on the upper part, only the “subdatasheet” which you are currently working on, is refreshed. The lower part will refresh all related “subdatasheet”.

Conclusion: a “subdatasheet” is okay to view or change information from related tables but, for entering data in different tables, there are better ways.

We will discuss this in “Forms” lesson.

Awesome!
You've completed Lesson 18
START NEXT LESSON