Exploring Forms

Access tables are dense lists of raw information. If you create a database that only you will use, you will probably be very comfortable working directly with tables. But if you create a database that will be viewed and edited by people who don’t know much about it—and don’t necessarily want to know about it—working with your tables might be overwhelming. To solve this problem, you can design forms to guide users through your database, making it easier for them to enter, retrieve, display, and print information.

A form is essentially a window in which you can place controls that either give users information or accept information that they enter. Access provides a toolbox that includes many standard Windows controls, such as labels, text boxes, option buttons, and check boxes. With a little ingenuity, you can use these controls to create forms that look and work much like the dialog boxes in all Microsoft Windows applications.

You use forms to edit the records of the underlying tables or enter new records. As with tables and queries, you can display forms in several views. The three most common views are Form view, in which you enter data; Datasheet view, which looks essentially like a table; and Design view, in which you work with the elements of the form to refine the way it looks and works. This graphic shows what a form looks like in Design view:

Exploring Forms

This form consists of a main form that is linked to just one table. But a form can also include subforms that are linked to other tables. Arranged in the form are label controls containing text that appears in the form in Form view, and text box controls that will contain data from the table. Although you can create a form from scratch in Design view, you will probably use this view most often to refine the forms you create with a wizard.

In this exercise, you will take a look at a few of the forms in the GardenCo database that have been designed to make viewing tables, editing existing information, and adding new information easier and less error-prone.

USE the GardenCo database in the practice file folder for this topic. This practice file is located in the My DocumentsMicrosoft PressAccess 2003 SBSKnowAccessForms folder and can also be accessed by clicking Start/All Programs/Microsoft Press/Access 2003 Step by Step.

OPEN the GardenCo database and acknowledge the safety warning, if necessary.

  1. On the Objects bar, click Forms, and then double-click Switchboard to open the main switchboard.

    Exploring Forms

    The Switchboard form has a customized title bar at the top, a title for the GardenCo database, and four command buttons. The first two buttons open switchboards—other forms—that have the same name as the button.

  2. On the switchboard, click the Forms button to display the Forms switchboard.

  3. Click Edit/Enter Orders to display the Orders form.

    Exploring Forms

    This form consists of a main form and a subform.

  4. On the Navigation bar, click the Next Record button to display that record’s information.

    Exploring Forms
  5. Click the New Record button (the one with asterisk) to display a blank form where you could enter a new order.

    Exploring Forms
  6. Close the Orders form, and in the Forms switchboard, click Return to redisplay the main switchboard.

  7. Click the Close Switchboard button.

  8. In the database window, double-click Products in the Forms list to open the form.

    Exploring Forms

    You use this form to edit the records of current products or enter new ones.

  9. You are currently looking at the form in Form view. On the toolbar, click the down arrow to the right of the View button, and click Datasheet View.

    Exploring Forms

    Now the form looks essentially like the Products table in Datasheet view but without gridlines.

    Exploring Forms
  10. Click the View button again to switch to Design view, and then maximize the form window.

  11. If the Toolbox is not displayed, on the toolbar, click the Toolbox button.

    Exploring Forms
    Exploring Forms

    Tip

    If the Toolbox is in the way, drag it by its title bar to a location where it’s not obscuring anything.

  12. Point to each of the icons in the Toolbox until the name of the tool is displayed.

    These are the tools you use to build custom forms for your database.

  13. Close the Toolbox.

  14. Close the Products form.

CLOSE the GardenCo database.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset