| Introduction to Form and Report Design |
Forms Fundamentals
Introduction
Besides tables, data is presented in friendlier objects named forms. When it comes to data of a database, there are two broad types of forms: data-unrelated and data-related.
Practical Learning: Introducing Forms
- Start Microsoft Access
- From the list of files, click Cruise1 (from the previous lesson)
Unrelated Forms
Although most of the forms you will use in a database are meant to display data from a table, you can create an independent form whose functionality and behavior do not depend on the data from a database. To create a blank form, on the Ribbon, click Create and, in the Forms section, click Blank Form:
Practical Learning: Creating a Form
- On the Ribbon, click Create
- In the Forms section, click Blank Form
- To close the form (without saving it), press Ctrl + F4
Automatic Forms
Before creating a form, you must decide where data would come from. If the data of a form will be based on a table, you can specify it. To easily create a form that would display data, in the Navigation Pane, select the table. In the Ribbon, click Create. In the Forms section, click Form.
Practical Learning: Creating a Form Automatically
- The Cruise1 database should still be opened.
In the Navigation Pane, click Rooms to select the table - On the Ribbon, click Create
- In the Forms section, click Form
The Name of a Form
A form must have a name. You can name it when saving or after creating it. To save and name a form:
- Right-click the form's tab or title bar and click Save
- Close the form. You would be prompted to save the form
If the form was not saved previously, you would be prompted to give it a name. If a form is based on a table, it may be a good idea to give the same name as the table.
Practical Learning: Naming a Form
- Right-click the form's tab and click Save
- Accept the suggested name of the form as Rooms and click OK
- Close the form
The Form Wizard
The Form Wizard provides an easy and fast means of creating a form. To launch the Form Wizard, on the Ribbon, click Create. In the Forms section, click Form Wizard.
Practical Learning: Using the Form Wizard
- The Cruise1 database should still be opened.
On the Ribbon, click Create - In the Forms section of the Ribbon, click Form Wizard
- In the first page of the wizard, in the Tables/Queries combo box, select Table: Departments
- In the first page of the wizard, double-click the DepartmentCode
- Double-click the DepartmentName
- Click Next
- Click Next
- Accept the suggested name of the form as
Departments and click Finish
An automatic form is created for you - To close the form as a Windows object, click its Close button
Introduction to Form Maintenance
Opening a Form in Form View
The Form View is the view used for regular operations on a form. To open a form in Form View:
- In the Nativation Pane:
- Double-click the name of the form
- Right-click the form and click Open
- If the form is opened in another type of view:
- In the Nativation Pane, double-click the name of the form
- On the Ribbon, click Home, Design, or Datasheet (this depends on the type of view). In the Views section (on the left of the Ribbon), click the arrow button under View, and click Form View
- On the status bar, click the Form View button
Form Design Fundamentals
The design of a form is done by displaying the object in Design View. To present a form in Design View:
- If the form is currently closed, in the Navigation Pane, right-click the form and click Design View
- If the form is currently opened:
On the other hand, if the form is currently displaying in Design View and you want to switch it to Form View:
- In the Navigation Pane:
- Double-click the name of the same form
- Right-click the name of the same form and click Open
- On the Ribbon, click either Design or Home, in the Views section:
- Click the View button
- Click the down-pointing button under View and click Form View
Practical Learning: Introducing Form Design
- The Cruise1 database should still be opened.
On the Ribbon, click Create - To create a new form, in the Forms section, click Form Design
- To close the form without saving it, click its close button
Reports Fundamentals
Introduction
A report is an object made to print the records of a database. Just as mentioned for forms, a report can be made to display the records from a table or a report can be created independently or any table.
An Indepentent Report
A report is independent if it display text and other objects that are not tied to a table. To create such a form, on the Ribbon, click Create. In the Reports section, click Blank Report.
Practical Learning: Creating a Form
- On the Ribbon, click Create
- In the Reports section, click Blank Report
- To close the report without saving it, press Ctrl + F4
Automatic Reports
Microsoft Access provides the means of creating a report with the click of a few buttons. To use this feature, in the Navigation Pane, select the table. In the Ribbon, click Create. In the Reports section, click Report.
Practical Learning: Creating a Form Automatically
- The Cruise1 database should still be opened.
In the Navigation Pane, click Departments to select the table - On the Ribbon, click Create if necessary.
In the Reports section, click Report
Naming a Report
Like every object of a database, a report must have a name. If the report gets its records from a table, it is a good idea for it to hold the same name as the table. To save and name a report:
- Right-click its tab or title bar and click Save
- Close the report. You would be prompted to save it
Give a name to the report and press Enter.
Practical Learning: Naming a Form
- Right-click the report's tab and click Save
- Accept the suggested name of the report as Departments and click OK
- Close the report
The Report Wizard
The Report Wizard can be used to select the fields to display on a report. To start the Report Wizard, on the Ribbon, click Create. In the Reports section, click Report Wizard.
Practical Learning: Using the Form Wizard
- The Cruise1 database should still be opened.
On the Ribbon, click Create if necessary
In the Reports section of the Ribbon, click Report Wizard - In the first page of the wizard, in the Tables/Queries combo box, select Table: Customers
- In the first page of the wizard, click the Select All Fields button
- Click Next
- Accept everything in the second page and click Next
- In the Layout section, click the Columnar radio button
- Click Next
- Accept the suggested name of the form as Customers and click Finish
- To close the report as a Windows object, click its Close button
Report Design
A report must be designed in the Design View. To display it in that view:
- In the Navigation Pane, right-click the report and click Design View
- If the report was opened already, right-click its title bar or tab and click Design View
Practical Learning: Introducing Form Design
- The Cruise1 database should still be opened.
On the Ribbon, right-click the Customers report and click Design View - To close the report, click its Close button
- If necessary, on the Ribbon, click Create.
To create a new report, in the Reports section, click Report Design - To close the report without saving it, click its Close button
Introduction to the Properties Window
Overview
When designing a form, one of the objects you will regularly use is called the Property Sheet. To get the Property Sheet of the properties associated with a control, while the form is in Design View, right-click the object and click Properties. To display the Property Sheet for the form in Design View:
Any of these actions would display the Property Sheet:
There are various ways you can close or hide the Property Sheet:
To change the object whose properties you want to access:
- Click the form or the control
- Select its name in the combo box of the Property Sheet
The Properties window is made of five property pages or tabs: Format, Data, Event, Other, and All. Each tab is made of two sections devided by a vertical line:
There are values types of properties.
Practical Learning: Accessing the Properties Window
The Name of a Property
The name of a property specifies what it is used for. Each field in the Property Sheet displays its name on the left side:
The Value of a Property
The value of a property defines the role of that property on the object on which it applies. In the Property Sheet, the value of a property displays on the right side of its name:
The Types of Properties
Text-Based Properties
Some values of properties can be made of one or more characters or words. Here is an example:
To specify the value of a text-based property, click either the name or the property field and type it.
Number-Based Properties
A property is numeric if it must hold an integral or decimal value. Here is an example:
If the value is a natural number, simply type.
A decimal number, also called a floating-point number, can be made of digits or a combination of digits and one period. Here are examples:
To specify the value, type it, including its decimal separator. If the value is less than 1, such as 0.2167, you can type it like that or only start it with a period followed by the other digits.
Expression-Based Properties
Some properties are made of a combination of specific characters and digits, referred to as a combination.
Boolean Properties
A property is referred to as Boolean if it can have only either a Yes or a No value, an On or an Off value, a 0 or no 0 value. Here are examples:
To change the value of a Boolean property:
- You can click the property name to display its combo box, then click the arrow of the combo box and select the desired value
- You can double-click the property name or its value
- You can click the property name, type the first letter of the value, such as y or n and Microsoft Access would complete with the corresponding value
Enumerated Properties
Some properties provide a list of options as the possible values of the property. To change the value of an enumerated property:
- You can click the property name to reveal its combo box, click the arrow of the combo box and select the desired value from the list
- You can double-click either the property name or the property value
Action-Based Properties
Some properties need a value that may be gotten from an external object or another application. In the Property Sheet, such properties show an ellipsis button:
When you click the ellipsis button , a dialog box or a window may come up.
Practical Learning: Ending the Lessons
- Close Microsoft Access
- When asked whether you want to save, click No