Adding Forms Using the Ribbon

Use the Form group in the Create tab on the Ribbon to add forms to your database. The commands in the Form group—shown in Figure 35-1—let you create the following different types of forms:

  • Form: Creates a new form that lets you enter information for one record at a time. You must have a table, query, form, or report open or selected to use this command.

  • Split Form: Creates a split form that shows a datasheet in the lower section and a form in the upper section for entering information about the record selected in the datasheet.

  • Multiple Items: Creates a form that shows multiple records in a datasheet, with one record per row.

  • PivotChart: Instantly creates a PivotChart form.

  • Blank Form: Instantly creates a blank form with no controls.

  • More Forms: This drop-down list lets you start the Form Wizard or instantly create a Datasheet, Modal Dialog, or PivotTable.

  • Form Design: Creates a new blank form and displays it in Design View.

Figure 35-1. The Ribbon’s Create tab. Use the Form group to add new forms to your database.


Creating a new form

Use the Form command in the Form group of the Ribbon’s Create tab to create a new form based on a table or query selected in the Navigation Pane. To create a form based on the example tblProducts table you created in the last chapter, follow these steps:

1.
Select tblProducts in the Navigation Pane.

2.
Click the Create tab on the Ribbon, and then click on the Form command in the Form group.

Access creates a new form containing all the fields from tblProducts displayed in Layout View, shown in Figure 35-2. Layout View lets you see the forms data while changing the layout of controls on the form.

Figure 35-2. Creating a new form. Use the Form command to quickly create a new form with all the fields from a table or query.


Note

You may notice that Figures showing forms and other objects in this chapter and the next two no longer show the objects in the new tabbed format that is the default in Access 2007. That’s because in some objects, like a form, you might not be able to see the fields completely in a tab rather than a window. The example files that you download for this chapter and the next two have already been set up to use windows rather than tabs for objects. To change between the tab and window display methods, select Office Button Access Options. Click Current Database in the list at the left. Under Document Window options (in the Application Options section), click Overlapping Windows to display objects in windows, or Tabbed Documents to show tabs (make sure that Display Document Tabs is also checked). When you click OK, a message box tells you that you must close and reopen the database for the change to take effect. Click OK. Select Office Button Close Database to close the file, and then reopen it. Also note that depending on the screen resolution that you’re using, some fields may appear cut off, even in a window. You can change your screen resolution or resize the Navigation Pane as needed to show more information in the windows in Access, as needed.


Creating a split form

Use the Split Form command in the Form group on the Create tab of the Ribbon to create a split form based on a table or query selected in the Navigation Pane. This new feature gives you two views of the data at the same time, letting you select a record from a datasheet in the upper section and edit the information in a form in the lower section. To create a split form based on tblProducts, follow these steps:

1.
Select tblProducts in the Navigation Pane.

2.
Click the Create tab on the Ribbon, and then click on the Split Form command in the Form group.

Access creates a new split form based on tblProducts displayed in Layout View, shown in Figure 35-3. Resize the form and use the splitter bar in the middle to make the lower section completely visible.

Figure 35-3. Create a split form when you want to select records from a list and edit them in a form. Use the splitter bar to resize the upper and lower sections of the form.


Creating a multiple-items form

Use the Multiple Items command in the Form group of the Ribbon’s Create tab to create a multiple-items form based on a table or query selected in the Navigation Pane. This new feature creates a form that looks like a datasheet, but it lets you add graphical elements, buttons, and other controls. To create a multiple-items form based on tblProducts, follow these steps:

1.
Select tblProducts in the Navigation Pane.

2.
Click the Create tab on the Ribbon, and then click on the Multiple Items command in the Form group.

Access creates a new multiple items form based on tblProducts displayed in Layout View, shown in Figure 35-4. Although the form looks similar to a datasheet, you can only resize the rows and columns in Design View and Layout View.

Figure 35-4. Create a multiple items form when you want to see data similar to Datasheet View but also want to add form controls such as buttons and graphical elements.


 

Creating a form using the Form Wizard

Use the Form Wizard command in the Form group’s More Forms drop-down list to create a form using a wizard. The Form Wizard visually walks you through a series of questions about the form that you want to create and then creates it for you automatically. The Form Wizard lets you select which fields you want on the form, the layout (Columnar, Tabular, Datasheet, Justified) of the form, the style (Access 2003, Access 2007, Apex, and so on), and the title on the form.

To start the Form Wizard based on tblProducts, follow these steps:

1.
Select tblProducts in the Navigation Pane.

2.
Click the Create tab on the Ribbon, and then click on the Form group’s More Forms drop-down and select Form Wizard.

Access starts the Form Wizard shown in Figure 35-5. Choose which table or query you want the form based on using the Tables/Queries drop-down list. Use the buttons in the middle of the form to add and remove fields to the Available Fields and Selected Fields list boxes.

Figure 35-5. Use the Form Wizard to create a form with the fields you choose, as well as the layout and styles you want.


Note

You can also double-click any field in the Available Fields list box to add it to the Selected Fields list box.


The series of buttons at the bottom of the form let you navigate through the other steps of the wizard. The types of buttons available here are common to most wizard dialog boxes:

  • Cancel: Cancel the wizard without creating a form

  • Back: Return to the preceding step of the wizard

  • Next: Go to the next step of the wizard

  • Finish: End the wizard using the current selections

Caution

If you click Next or Finish without selecting any fields, Access tells you that you must select fields for the form before you can continue.


Creating a datasheet form

Use the Datasheet command in the Form group’s More Forms drop-down list to create a form that looks like a table or query’s datasheet. A datasheet form is useful when you want to see the data in a row and column format but want to limit which fields are displayed and editable. To create a datasheet form based on tblProducts, follow these steps:

1.
Select tblProducts in the Navigation Pane.

2.
Click the Create tab on the Ribbon, and then click on the Form group’s More Forms drop-down and select Datasheet.

You can view any form you create as a datasheet by selecting Datasheet View from the Home tab’s View drop-down. A datasheet form appears in Datasheet View by default when you open it.

Tip

You can prevent users from viewing a form as a datasheet by setting the form’s properties. You’ll learn more about form properties later in this chapter.


Creating a blank form

Use the Blank Form command in the Form group of the Create tab on the Ribbon to create a form without any controls. To create a blank form based on tblProducts, follow these steps:

1.
Select tblProducts in the Navigation Pane.

2.
Click the Create tab on the Ribbon, and then click on the Blank Form command in the Form group.

Access creates a new blank form based on tblProducts displayed in Layout View. In the next section, you’ll learn how to add and customize controls on the form.

Use the Form Design command in the Form group of the Create tab on the Ribbon to create a blank form and display it in Design View.

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

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