ACC97: How to Use the Tab Control in Microsoft Access 97

Last reviewed: July 1, 1997
Article ID: Q160127
The information in this article applies to:
  • Microsoft Access 97

SUMMARY

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

This article demonstrates how to use the Tab control on a form in Microsoft Access 97.

MORE INFORMATION

A Tab control is the easiest and most effective way to create a form with multiple pages or multiple embedded forms.

With a Tab control, you can build separate pages into one control. To switch pages, you click one of the tabs on the control. To see an example of a multi-page form that uses the Tab control, open the Employees form in the sample database Northwind.mdb.

The following steps show you how to create a form with a Tab control, where the Tab control is a container for multiple forms:

  1. Open the sample database Northwind.mdb.

  2. Create a new form not based on any table or query in Design View, and name it My Switchboard:

    Form: My Switchboard ----------------------- Width: 6"

    Detail Section:

             Height: 5"
          Label:
             Caption: Switchboard
             Left: 2"
             Top: .5"
             Width: 2"
             Height: .5"
             FontSize: 24
    
    

  3. Click the Tab Control button in the toolbox, and then click somewhere below the label on the form. Microsoft Access adds a Tab control with two pages to the form.

  4. Set the following properties for the Tab control:

    Left: .25" Top: 1" Width: 5.5" Height: 4"

  5. Using the right mouse button (right-click), click the left tab on the Tab control, and then click Insert Page on the menu that appears. This adds a third tab to the control.

  6. Click the left tab on the Tab control and set its Caption property to Employees.

  7. Click the Subform/Subreport control in the toolbox. On the View menu, click Properties, and then set the AutoLabel property to No.

  8. Press F11 to bring the Database window to the foreground, and position the windows on the screen so you can see the Employees form in the Database window as well as the Tab control on the My Switchboard form.

  9. Drag the Employees form from the Database window to the Tab control. The Employees form becomes a subform object on the Tab control.

  10. Set the following properties for the new subform object:

    Left: 0" Top: 1.25" Width: 6" Height: 4"

    NOTE: Some of these properties may force a minimum default value. For example, Left may default to a minimum value of .0938".

  11. Click the center tab on the Tab control and set its Caption property to Orders.

  12. Repeat steps 8 and 9 with the Orders form.

  13. Set the following properties for the new subform object:

    Left: 0" Top: 1.25" Width: 6" Height: 4"

    NOTE: Some of these properties may force a minimum default value. For example, Left may default to a minimum value of .0938".

  14. Click the right tab on the Tab control and set its Caption property to Products.

  15. Repeat steps 8 and 9 with the Products form.

  16. Set the following properties for the new subform object:

    Left: 0" Top: 1.25" Width: 6" Height: 4"

    NOTE: Some of these properties may force a minimum default value. For example, Left may default to a minimum value of .0938".

  17. Click the Subform/Subreport control in the toolbox, and then set its AutoLabel property back to Yes.

  18. Save the form, open it in Form view, and maximize the window. Click the different tabs at the top of the Tab control and note that the Employees, Orders, and Products forms are displayed.

REFERENCES

For more information about creating a form with multiple pages or tabs, search the Help Index for "tab controls," or ask the Microsoft Access 97 Office Assistant.


Keywords : FmsHowto kbusage
Version : 97
Platform : WINDOWS
Hardware : X86
Issue type : kbhowto


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 1, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.