GO! with Microsoft Access 2016 Comprehensive First Edition Chapter 3 Forms, Filters, and Reports
2
Create and Use a Form to Add and Delete Records A form is a database object that can be used to: display existing records in a table, one record at a time, add new records, change existing records, or delete specific records. The fastest and easiest way to create a form is to use the Form tool. With a single mouse click, all fields from the data source are placed on the form. Records that you create or edit using a form are automatically updated in the underlying table or tables. The reverse is also true. 3
Create and Use a Form to Add and Delete Records 4
Filter Records Filtering records in a form displays only a portion of the total records a subset based on matching values. Filtering records within a form provides individuals who do not have access to the entire database a way to ask questions of the database without constructing a query. You can save the filter with the form if you are going to use the filter frequently. There are two types of filters: Filter by Selection which displays only the records that contain the value in the selected field. Filter by Form filters records based on one or more fields, or based on more than one value in the same field. 5
Filter Records 6
Filter Records 7
Filter Records For more advanced sorting, use Advanced Filter. In the Sort & Filter group, click Advanced/Filter/Sort. The Advanced Filter design grid displays, which is similar to the query design grid. 8
Create a Form by Using the Form Wizard The Form Wizard walks you step by step through the creation of a form and gives you more flexibility in the design, layout, and number of fields in a form than the Form tool. Forms are designed for the user of the form. 9
Modify a Form in Layout View and in Design View The Layout view enables you to see the data in the form as you modify it. There are controls for forms that you must work with when modifying a form. Most changes to a form can be made in Layout view. For example, you can group the fields, resize the fields, add more fields to the form, and change the style of the form. 10
Modify a Form in Layout View and in Design View 11
Modify a Form in Layout View and in Design View Design view presents a detailed view of the structure of the form. In Design view, the data does not display in the text box controls. The form in Design view displays three sections: The Form Header, the Detail section, and the Form Footer. 12
Modify a Form in Layout View and in Design View The Property Sheet can be displayed for each section of the form in Design view. 13
Create a Report by Using the Report Tool and Modify the Report in Layout View A report is a database object that summarizes the fields and records from a query or a table in an easy-to-read format suitable for printing. A report consists of information extracted from the record source (queries or tables) and design controls such as labels, headings, and graphics. The Report tool is the fastest way to create a report. This tool displays all of the fields and records from the record source that you select. 14
Create a Report by Using the Report Tool and Modify the Report in Layout View The Layout view enables you to see the data in the report as you modify it. In this view you can add, resize, or delete fields, and change the style of the report. In a report created by using the Report tool, a calculated control is automatically created to sum any field that is formatted as currency. 15
Create a Report by Using the Report Wizard Use the Report Wizard when you need more flexibility in the design of your report. 16
Create a Report by Using the Report Wizard You can group and sort data and use fields from more than one table or query if you have created the relationships between tables. 17
Create a Report by Using the Report Wizard 18
Modify the Design of a Report A report can be modified in Layout view and Design view. In Layout view, just as in a form, the field names and data are displayed. You can modify the layout by clicking the control. When the control is clicked, all the related controls are also selected. You can resize fields, change font size, and move controls at the same time. You can also delete unneeded controls in the same manner. The Property Sheet can be used to make any changes to the report also. 19
Modify the Design of a Report 20
Modify the Design of a Report Design view gives you a more detailed view of the structure of your report. In the same manner as forms, you can add labels to the Page Footer section, increase the height of sections, or align controls in Design view. 21
Keep Grouped Data Together in a Printed Report Before printing a report, use Print Preview to be sure that all the labels and data display fully and all the data is properly grouped. Sometimes a page will break in the middle of a group with the labels on one page and the data or summary information on another. 22
Keep Grouped Data Together in a Printed Report To prevent this from happening, specify to keep whole group together on one page command in the Layout view. 23
Glossary
And condition: A condition in which records display only when all of the specified values are present in the selected fields. Bound: A term used to describe objects and controls that are based on data that is stored in tables. Bound control: A control that retrieves its data from an underlying table or query; a text box control is an example of a bound control. Calculated control: A control that contains an expression, often a formula or function, that most often summarizes a field that contains numerical data. Control: An object on a form or report that displays data or text, performs actions, and lets you view and work with information. Control layout: The grouped arrangement of controls on a form or report; for example, the Stacked layout. Data entry: The action of entering the data into a record in a database table or form. Date control: A control on a form or report that inserts the current date each time the form or report is opened. Design view: The Access view that displays the detailed structure of a query, form, or report; for forms and reports, may be the view in which some tasks must be performed, and displays only the controls, not the data. 25
Detail section: The section of a form or report that displays the records from the underlying table or query. Filter by Form: An Access command that filters the records in a form based on one or more fields, or based on more than one value in the field. Filter by Selection: An Access command that displays only the records that contain the value in the selected field and hides the records that do not contain the value. Filtering: The process of displaying only a portion of the total records (a subset) based on matching specific values to provide a quick answer to a question. Form: A database object that you can use to enter new records into a table, or to edit, delete, and display existing records in a table. Form Footer: Information displayed at the bottom of the screen in Form view or Layout view that is printed after the last detail section on the last page of a printout. Form Header: Information such as a form s title that displays at the top of the screen in Form view or Layout view and is printed at the top of the first page when records are printed as forms. Form tool: An Access tool that creates a form with a single mouse click, which includes all of the fields from the underlying data source (table or query). Form view: The Access view in which you can view, modify, delete, or add records in a table but you cannot change the layout or design of the form. 26
Form Wizard: An Access tool that walks you step by step through the creation of a form and that gives you more flexibility in the design, layout, and number of fields in a form. Group Footer: Information printed at the end of each group of records to display summary information for the group. Group Header: Information printed at the beginning of each new group of records; for example, the group name. Group, Sort, and Total pane: A pane that displays at the bottom of the window in Design view in which you can control how information is sorted and grouped in a report; provides the most flexibility for adding or modifying groups, sort orders, or totals options on a report. Label control: A control on a form or report that contains descriptive information, usually a field name or title. Layout selector: A small symbol that displays in the upper left corner of a selected control layout in a form or report that is displayed in Layout view or Design view and is used to move or format an entire group of controls. Layout view: The Access view in which you can make changes to a form or report while the data from the underlying data source displays. Or condition: A condition in which records display that match at least one of the specified values. 27
Page Footer: Information printed at the bottom of every page in a report and most often includes the page number. Page Header: Information printed at the top of every page in a report. page number control: A control on a form or report that inserts the page number when displayed in Print Preview or when printed. Record selector bar: The vertical bar at the left edge of a record used to select an entire record in Form view. Record source: The tables or queries that provide the underlying data for a form or report. Report: A database object that summarizes the fields and records from a query or table in an easy-to-read format suitable for printing. Report Footer: Information printed at the bottom of the last page of a report. Report Header: Information printed on the first page of a report that is used for logos, titles, and dates. Report tool: An Access tool that creates a report with one mouse click and displays all of the fields and records from the record source that you select. Report Wizard: An Access tool that walks you step by step through the creation of a report and that gives you more flexibility in the design, layout, and number of fields in a report. 28
Rich Text Format (RTF): A standard file format that contains some formatting such as underline, bold, font sizes, and colors. RTF documents can be opened in many applications. Section bar: In Design view, a gray bar in a form or report that identifies and separates one section from another; used to select the section and to change the size of the section. Stacked layout: A control layout format that is similar to a paper form, with label controls placed to the left of each text box control; the controls are grouped together for easy editing. Subset: A portion of the total records available. Tab order: The order in which the insertion point moves from one field to another in a form when you press the Tab key. Text box control: A bound control on a form or report that displays the data from the underlying table or query. Theme: A predesigned set of colors, fonts, lines, and fill effects that look good together and that can be applied to all of the objects in the database or to individual objects in the database. Unbound control: A control that does not have a source of data, such as the title in a form or report. 29