ACC2000: Caption Section of a Data Access Page Is Visible Only When the Group Is Expanded (200209)



The information in this article applies to:

  • Microsoft Access 2000

This article was previously published under Q200209
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

The caption section of a data access page serves much like a section header in a report. Information that applies to the entire group can be displayed here to avoid duplication of information in every record. The primary difference between a caption section and a section header is that the caption section is hidden or is displayed based on the expanded value of the section that it belongs to. For example, if you have a grouped page, and the band to which the caption section is associated is not expanded, the caption section and the controls in the caption section are not displayed. When the group is expanded, all information in the caption section is displayed.

Only controls that are not bound can be displayed in a caption section. Group Filter controls are not bound and can be used in a caption section of a page to allow users to select which set of records they want to be displayed in the associated group.

Caption sections can only be placed on data access pages that are bound.

MORE INFORMATION

To see an example of how to create a caption section on a data access page, follow these steps:
  1. Open the sample database Northwind.mdb.
  2. Click Pages, click New, click Design View, and then click OK.
  3. If the field list is not displayed, click Field List on the View menu, and then drag the following fields from the field list to the page:
    • From the Customers table: CustomerID and CompanyName
    • From the Orders table: OrderID and Freight
  4. Click the CustomerID field that you placed on the page, and then click Group by Table on the toolbar.
  5. On the View menu, click Sorting and Grouping.
  6. In the Sorting and Grouping dialog box, click Orders to set it as the Group Record Source.
  7. Under Group Properties, set the CaptionSection property to Yes. This creates a new section on the page, Caption: Orders.
  8. Add a label control to the Caption: Order section, and set its InnerText property to Order Information.
  9. On the View menu, click Page View. Note that when you view the page, by default, the Orders section of the page is not expanded. If you click the expand button on the page, the Orders section, as well as the caption section that you created in previous steps, is visible.

Modification Type:MajorLast Reviewed:6/30/2004
Keywords:kbDAP kbhowto KB200209