ACC97: How to Use the Tab Control with Linked SubformsID: Q171222
|
Novice: Requires knowledge of the user interface on single-user computers.
You can use the tab control to display linked subforms. A form contains
linked subforms when the second subform displays only the records related
to the record that you select in the first subform. The Customer Orders
form in the sample database Northwind.mdb contains an example of linked
subforms.
Because the tab control enables you to place different controls on
different pages of a single control, you can make better use of available
space on the main form and still have plenty of room to display the
subforms.
NOTE: A demonstration of the technique used in this article can be seen
in the sample file, FrmSmp97.exe. For information about how to obtain
this sample file, please see the following article in the Microsoft
Knowledge Base:
Q175066 ACC97: Microsoft Access 97 Sample Forms Available on MSL
The following example demonstrates how to create a form with two linked
subforms similar to those on the Customer Orders form. The tab control on
the main form contains one of the linked subforms on each of its two pages.
Left: 0"
Top: .25"
Width: 6"
Height: 3"
Left: 0.5"
Top: 0.75"
Width: 3.5"
Height: 1.5"
LinkChildFields: OrderID
LinkMasterFields: [Customer Orders Subform1].[Form]![OrderID]
Left: 0.5"
Top: 0.75"
Width: 5.5"
Height: 1.5"
For more information about the Tab control, please see the following
article in the Microsoft Knowledge Base:
Q160127 ACC97: How to Use the Tab Control in Microsoft Access 97
Keywords : kbusage FmsSubf
Version : 97
Platform : WINDOWS
Issue type : kbhowto
Last Reviewed: April 17, 1999