Microsoft KB Archive/304278

= ACC2000: Working with Subdatasheets in Microsoft Access =

Article ID: 304278

Article Last Modified on 7/21/2006

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q304278



Novice: Requires knowledge of the user interface on single-user computers.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).



SUMMARY
In a subdatasheet, you can view and edit related or joined data in a table or a query, in a form datasheet, or in a subform. For example, in the Northwind sample database, the Suppliers table has a one-to-many relationship with the Products table; therefore, for each row of the Suppliers table in Datasheet view, you can view and edit the related rows of the Products table in a subdatasheet.



To Insert a Subdatasheet

 * 1) Start Microsoft Access, and then open the database that you are working with.
 * 2) Open a table or a query in Datasheet view.
 * 3) On the Insert menu, click Subdatasheet.
 * 4) Click the Tables, the Queries, or the Both tab, depending on which kind of object you want to insert as a subdatasheet.
 * 5) Select a table or query in the list.
 * 6) In the Link Child Fields box, click the field to be the foreign key or matching field for the table or query that is the subdatasheet that you chose in step 5. For example, if you wanted to create a subdatasheet to view related Orders for each Customer record, choose the Customer field in the Orders table.
 * 7) In the Link Master Fields box, choose the field to be the primary key or matching field for the table or query that is the main datasheet that you opened in step 2.

To Remove a Subdatasheet

 * 1) Open the table or query that contains the subdatasheet in Datasheet view.
 * 2) On the Format menu, point to Subdatasheet, and then click Remove. NOTE: Removing a subdatasheet does not delete the table or query, nor does it modify any relationship.

