Access Week 4

 

Home
Windows Essentials
Word Week 1
Word Week 2
Word Week 3
Web with Word
Excel Week 1
Excel Week 2
Excel Week 3
Excel Week 4
Excel Week 5
Access Database files
Access Week 1
Access Week 2
Access Week 3
Access Week 4
Access Week 1 Class Exercise

More on Queries

Action Query: Makes changes to many records in one operation. There are four types of action queries:

q A make-table query creates a new table from selected data in one or more tables.

q An update query makes update changes to records, such as when you need to raise salaries of all salaries of all staff by %7.

q An append query adds records from one or more tables to the end of other tables.

q A delete query deletes records from a table or tables.

Reports

Data and information are not synonymous although the terms are often interchanged. Data is raw material and consists of the table (tables) that compose a database. Information is finished product. Data is converted to information by selecting records, performing calculations on those records, and/or changing the sequence in which the records are displayed. Decisions in an organization are made on the basis of information rather than raw data.

A report is a printed document that displays information from a database. You can prepare numerous reports based on a single database. You can create a report based on either a table or a query.

Kinds of reports

1. Columnar (Vertical) Report

It lists every field for every record in a single column.

2. Tabular Report

It displays fields in a row rather than in a column. Each record in the underlying table is printed in its own row. And, only selected fields are displayed.

Anatomy of a report

« Report Header: It appears once, at the very beginning of a report. It may contain the title of the report and the date it was printed.

« Page Header: It appears at the top of every page in the report. It can be used to display page numbers, column headings (field names and/or headers for calculated controls)

« Group Header: It appears at the beginning of a group of records to identify the group. Groups are formed when you sort the records in a report according to a common value in a field.

« Detail Section: It appears in the main body of a report and is printed once for every record in the underlying table (query).

« Group Footer: It appears after the last record in a group and contains summary information about the group.

« Page Footer: It appears at the bottom of each page in a report and may contain page numbers or other descriptive information.

« Report Footer: It appears once, at the end of a report, above the page footer on the last page of the report.

The Report Wizard

The steps in creating a report using the report wizard is listed below:

Select the Reports object in the Database Window.

Double click Create report by using Wizard.

Select the table/query that the report will be based on.

Select the fields that will be in the report. Click Next.

Specify the grouping level, if any. Click Next.

Specify the sort order, if any. Click Next.

Select the layout ( One of: Columnar| Tabular| Justified , or Stepped| Block| Outline 1 | Outline 2| Align left 1| Align left 2 ), orientation ( Portrait| Landscape ) and mark the check box which says Adjust the field width so all fields fit on a page so that you will have each row fit on a single page. Click Next.

Select the style ( Bold| Casual| Compact| Corporate| Formal| Soft Gray ) which basically defines the font characteristics of each section of the report. Click Next.

Enter the title of the report (which is equivalent to the name of the report!) Click either the option to Preview the report or Modify the report's design to customize the report.

The Print Preview Window

The Print Preview Window enables you to preview a report in various ways. Click on of the One Page, Two Page or Multiple Page buttons for different view o a report. Use the Zoom button to toggle between the Full Page and Zoom (magnified) views, or use the Zoom Control Box to choose a specific magnification. The Navigation buttons at the bottom of the Print Preview Window enable to preview of a specific page, while the vertical scroll bar at the right side of the window lets you scroll within a page.

The Report Design View

Controls in a report are defined as in a form, that is, there are bound controls, unbound controls and calculated controls in a report. Recall that the controls in a form inherit their properties from the corresponding fields in a table. The same concept applies to controls in a report. You can select, move and size the controls in a report in the same manner. You can use the toolbox to create new controls like in the Form Design View. You can change the property of a control in a report also in the same manner. That is, through one of four ways:

Right-click and select the Properties command to display the Property Sheet and change the required property.

Right-click and issue the appropriate command from the shortcut menu that is displayed.

Click on a button on the formatting toolbar.

Issue a command from the Format Menu.

 

The View Menu

You can make visible any invisible toolbar or the Toolbox itself by selecting the appropriate option from the View Menu.

You can change the Sorting and grouping order also from the view menu.

The Report Properties

The report itself has properties. Select the Reports object in the Database Window and right-click the report of your choice, and then select properties to display its properties. Fill the Description text box about the report.

More Access Functions

Now()

Returns the current date and time

[Page]

Returns the specific page number

[Pages]

Returns the total number of pages

&

Concatenation of strings

Sample: "Page" & [Page] returns Page1 for the 1st page, Page2 for the 2nd page, etc..

Avg (column name)

Returns the average of the values in the column identified by column name in the group/report

Sum (column name)

Returns the total of the values in the column identified by column name in the group/report

Min (column name)

Returns the minimum of the values in the column identified by column name in the group/report

Max (column name)

Returns the maximum of the values in the column identified by column name in the group/report

Count (column name)

Returns the number of the values in the column identified by column name in the group/report