Creating a Form by Using an AutoForm


Although a form doesn t have to include all the fields from a table, when it is used as the primary method of creating new records, it usually does include all of them. The quickest way to create a form that includes all the fields from one table is to use an AutoForm . And as with the forms created by a wizard, you can easily customize these forms.

In this exercise, you will create an AutoForm that displays information about each of the products carried by The Garden Company.

USE the GardenCo database in the practice file folder for this topic. This practice file is located in the  My Documents\Microsoft Press\Office 2003 SBS\Forms\AutoForm folder and can also be accessedby clicking Start/All Programs/Microsoft Press/Microsoft Office System 2003 Step by Step .

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

  1. On the Objects bar, click Forms .

  2. On the database window s toolbar, click the New button to display this New Form dialog box, which lists all the ways you can create a form.

    click to expand
  3. Click AutoForm: Columnar in the list of choices, click the down arrow to the right of the box at the bottom of the dialog box, click Categories , and then click OK .

    The dialog box closes , and after a moment a new Categories form is displayedin Form view.

  4. Click the Save button, accept the default name of Categories in the Save As dialog box, and click OK to view the form.

    click to expand
    Tip  

    When AutoForm creates a form, Access applies the background style you selected the last time you used the Form Wizard (or the default style, if you haven t used the wizard). If your form doesn t look like this one, switch to Design view, and on the Format menu, click AutoFormat. You can then select The Garden Company style from the list displayed.

  5. This form looks pretty good as it is, but switch to Design view so that you can make a few minor changes.

  6. Delete the word Category from the Category Name label.

  7. The CategoryID value is provided by Access and should never be changed, so you need to disable that text box control. Click the control and if necessary, press [F4] to display the control s Properties dialog box.

  8. On the Data tab, change Enabled to No , and close the dialog box.

    Disabling the CategoryID text box changes it, and the label text, to gray.

  9. Switch to Form view, and scroll through a few categories. Try to edit entries in the Category ID field to confirm that you can t.

  10. You don t need scroll bars or a record selector in this form, so return to Design view, and display the form s Properties dialog box by clicking the Form selector and pressing [F4]. On the Format tab, change Scroll Bars to Neither and Record Selectors to No , and then close the dialog box.

  11. Save and close the Categories form.

CLOSE the GardenCo database.




Microsoft Office 2003 Step by Step
MicrosoftВ® Office ExcelВ® 2003 Step by Step (Step By Step (Microsoft))
ISBN: 0735615187
EAN: 2147483647
Year: 2005
Pages: 350
Authors: Curtis Frye

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net