Sie sind auf Seite 1von 28

Lesson 9

CREATING A SIMPLE FORM


Objective:
In this lesson, you will learn how to create form, with and without the Form Wizard.
Form is simply a form that appears on the screen that is used for viewing one data, editing existing
records, entering new records and printing individual records. Using the Access form you can create a
form that resembles the printed forms commonly used in an office.

There are four ways to create a form:

Create a form that lets you enter information for one record at a time. The Form command makes a basic
form, showing a single record at a time.

Command creates a form showing one record on top, and includes the datasheet view of entire source
table on the bottom.

Command creates a form that shows all the records at once, which looks very similar to the source table
in datasheet view.

Create a new blank form in Design View. In Design View, you can make advanced design changes to
forms, such as adding custom control types and writing code

Creating a Form
You can create form through a process known as wizards. Wizards speed up the process of creating a
professional form because it does the basic work for you. There are two types of wizards that you used to
create a form and these are Form and Form Wizard. You can use both of these forms to add, edit, or
delete data from a table or query.
Form creates a form that displays all fields and records in the selected table or query in the blink of an
eye. Form Wizard is hidden under the More Forms command. It walks you through the process of
creating more customized forms.

Creating a Form with


The easiest way to create a form is with Form. Form simply plunks the fields from a single table into a
form; its the least flexible form, but its very convenient.

Activity 10 CREATING A FORM WITH FORM


Follow these steps:
1. In the All Access Objects window or pane, click the Employee Info table.
2. Click the Create Tab, from Form group click Form.
3. And then click the Save button and name it as Employees Profile Form.

Creating a Form with


Form Wizard
The Form wizards require the user to interact with Access by providing some information that will be used
to create a new form. This type of wizards takes you through several different steps and asks you several
questions before it creates a form. There are four different types of layout in Form Wizard available in
Access and these are Columnar, Tabular, Datasheet, and Justified.

Activity 11 CREATING A FORM WITH FORM WIZARD


The Form Wizard offers a good compromise between the automation of Auto Form and the control of
creating a form from scratch. The following steps show you how to create a new form using the form
Wizard.
1. Click the Create tab, click More Forms and Select Form Wizard.
2. Open the Tables/Queries drop-down list and then choose the Employees Info table from the list.
3. Click the OK button.
4. In the next dialog box, Access displays all the fields associated with the highlighted table. Click the >>
button to move all the fields into the Selected fields box. All the fields that appear in the left box will
appear on the new form.

5. Click Next to continue. Youll be asked to choose a layout: Columnar (the most common), Tabular,
Datasheet, or Justified. Click each of the buttons to see a preview of that type. When youve made
a decision, click the one you want and click Next.
6. In this next step, Access asks you to select a background for your form, select any of the Style. The
preview of the form appears on the left side. Click the Next button.
7. The final step in the Form Wizard asks you to type a title for the form being created. Type Employees
Info Form as the title of this new form.
8. Click the Finish button and the form appears, ready for data entry. The first record in table appears
in it.

Sections of a Form

Form Header
A form header displays information that you want to show for every record, such as a title of the form,
or command buttons that open related forms or carry out other tasks. A form header appears at the
top of the screen in Form view and at the top of the first page when printed.
Page Header
A page header displays information such as a title, graphics, column headings, or any information
that you want at the top of every printed page. Page headers appear only on printed forms.
Detail Section
A detail section displays records. You can either display one record on the screen or page, or you
can display as many as will fit.
Page Footer
Page footer displays information such as the date, page number, or any information that you want at
the bottom of every printed page. Page footers appear only on printed forms.
Form Footer
Form footer displays information that you want to show for every record, such as command buttons or
instructions for using the form. Form footer appears only at the bottom of the screen in Form view or
after the last detail section on the last page when printed.

The Navigation Buttons


The buttons at the bottom of the window in Form View are called Navigation Buttons. These buttons
give the user a graphical way of quickly moving between records.
The following table briefly describes these buttons
Button
Description
Function
First record

Moves to the first record.

Previous record

Moves to the next record.

Last record

Moves to the last record.

Next record

Moves to the next record.

Blank (new) record

Add a new record

You create a basic form and customize it in Design view (Design view: A window that shows the design of
these database objects: tables, queries, forms, and reports, macros, and data access pages. In Design
view, you can create new database objects and modify the design of existing ones.) to suit your
requirements.
In the All Access Objects window or pane, click the Employee Info table.
Click the Create Tab, from Form group click Form Design.
3. Click the name of the table or other record source that includes the data you want to base your form
on. If the form won't contain data (for example, if you want to create a form to use as a switchboard to
open other forms or reports, or if you want to create a custom dialog box), don't select anything from
field list.
1.
2.

If you want to create a form that uses data from more than one table, base your form on a
query.

Activity 12 CREATING A FORM USING FORM DESIGN


The following steps show you how to create the Employees Salaries Entry form based on Employees
Info, Employees Income and Employees Deduction tables.
1. Click the Create tab, click Blank Forms.
2. At Blank Form change view into Design View,
3. Select the following fields from the Employees Info Table EmployeeID, Lastname, Firstname,
Middlename, and Position.
4. Click again the down-arrow button located to the right of the Tables/Queries box, and then select the
Employees Income table from the list.
5. The fields of the Employees Income table are displayed in the Available Fields box. In this box, the
EmployeeID field is highlighted. Since we are already used the EmployeeID of the Employees Info
table, there is no need for you to select this field again.
6. Instead, select the Department field and click the > button to moved this field in the Selected Fields
box.
7. Click the > again trice to move the NDW, PR, and GP fields in the Selected Fields box respectively.
8. Click again the down-arrow button located to the right of the Tables/Queries box, and then select the
Employees Deduction table from the list.
9. Select the following fields of the Employees Deduction Table SSS, PHIC, HDMF, WTAX,
ADV_VALE and TD.
10. After selecting the necessary fields, click now the Next button.
11. Click again the down-arrow button located to the right of the Tables/Queries box, and then select the
Employees Income table from the list.
12. Select the following fields of the Employees Income Table NP.
13. After selecting the necessary fields, click now the Next button.
14. The next step in the Form Wizard is the selection of layout for your form. Select the layout that you
want, in this Activity select Columnar and then click the Next button.
15. In the next step, the Form Wizard asks you to select the background. From the available list, select
the background that you want, in this exercise select Office and then click the Next button.
16. The final step in the Form Wizard asks you to enter a name for your form. Type Employees Salaries
Entry as the name for this form, and then click the Finish button. Wait for a few seconds while
Access generates the form.

Property Sheets
In Microsoft Access, you use properties to determine the characteristics of tables, queries, fields, forms,
reports, and data access pages. Every section and control on a form, report, or data access page has
properties as well. Control properties determine the structure, appearance, and behavior of a control, as
well as the characteristics of the text or data it contains.

The title bar shows the type and name of the selected object.
Each tab displays properties of a specific category.

Note: To open the properties window in design view, press F4.

Printing a Form
After Access displays the new form in the Form View window, you can print this form by following these
steps:
1. Click the Office button, point to Print and then click Print button.
2. In the Print dialog box, click OK button.

Lesson 10
MODIFYING FORM
Objective:
In this lesson, you will learn how to modify a form.

Arranging and Repositioning of Controls


Controls are graphical objects as labels, text boxes, lists, check boxes, and buttons, that you place in
a form to display the data or perform an action. Using a form you are not limited to change the labels and
text boxes size of each item; rather you can also move or reposition each control inside the form. For
Example if you want to move the GP control, follows these steps:
1. Right click the Employees Salaries Entry and select Design View.
2. Press and hold the left mouse button. Notice while you are still holding the left mouse button, the
mouse pointer changes to an open hand.
3. Drag the control on a new location.
4. Release the mouse button.
5. Now try to rearrange the controls of the Employees Salaries Entry Form as displayed.

Using the Controls Group


To simplify your task of placing controls on a form, Access provides an extensive tool set in the toolbox.
The table below briefly describes each tool set in the toolbox.

TOOL

TOOL NAME

PURPOSE

Select Object

Selects an Object.

Control Wizard

Turns the control wizard on or off.

Label

Create a label to display text.

Text Box

Create a box to display or edit data.

Option Group

Creates a group of control that allows one choice.

Toggle Button

Create a button to indicate a true value when pushed.

Option Button

Create one button in a single choice set of buttons.

Check Box

Create a box to indicate a true or false value.

Combo Box

Create a box to edit data or to choose value from a list.

List Box

Create a list of values.

Button

Create a button to run a macro or call a Visual Basic function.

Image

Create a frame to display a static image.

Unbound Object

Create a frame to display an OLE object.

Bound Object

Create a frame to display an OLE object from the database.

Page Break

Mark the beginning of a new screen or page.

Subform/Subreport

Create a frame to display an embedded form or report.

Line

Create a line.

Rectangle

Create a rectangle.

Types of Control
The Access form can have one of the three types of controls and these are bound, unbound and
calculated. The following section describes the differences between these types.

BOUND CONTROLS
A control that is connected or tied to a field in a forms underlying table or query. You use the bound
control to display, add, and update values from a field in your database.
In this activity, you are going to add bound controls to Employees Salaries Entry Form. You will begin
by deleting the original controls in the form the controls bound to the Sex fields and replace them with
bound control: the Sex text box becomes a Combo box.

ADDING BOUND CONTROLS TO THE FORM


To add button controls to the form, you have to follow these general steps:
1. In the toolbox, click a button that represents the type of control that you want.
2. Click the Field List button and then select the field that you want to display in the control.
3. Drag the selected field to the form.

PLACING COMBO BOXES IN A FORM


To place a combo box in the form, follow these steps:
1. In the Design View window, right click the Gender text box.
2. And then point to Change to and then select Combo Box.
3. Click the Save button from the Quick Access Toolbar.

UNBOUND CONTROLS
In an unbound control, the field is not connected or linked in the underlying table or query. You can use
unbound control to display information, lines, rectangles, and pictures.

ADDING UNBOUND CONTROLS TO THE FORM


Your next step for revising the form is to add two unbound controls to the form-a label that serve as the
heading and rectangle that will surround the text boxes.

PLACING A STAND - ALONE LABEL TO THE FORM


You can create a stand-alone label on the form by using the Label button located on the Toolbox. This
kind of label is not attached to any other form. Its function is to create other information such as heading
or title on a form.
1. In Design View, Select Label button from Control Group.
2. Click the Label button, and then drag the mouse pointer on the Form Detail Section. When you have
+
the mouse pointer it will appear as a A.
3. Click the left mouse button and type this heading:
Employee Name
Then press the Enter key to complete your entry.
4. In the toolbar, click the down-arrow on the Font Size box and then select 14 from the list, click the
Bold button.
5. Reposition and resize the label box.
6. Click the Label button, and then drag the mouse pointer on the Form Detail Section. When you have
+
the mouse pointer it will appear as a A.
7. Click the left mouse button and type this heading:
Earnings:
Then press the Enter key to complete your entry.
8. In the toolbar, click the down-arrow on the Font Size box and then select 14 from the list, click the
Bold button.
9. Reposition and resize the label box.
10. Click the Label button, and then drag the mouse pointer on the Form Detail Section. When you have
+
the mouse pointer it will appear as a A.
11. Click the left mouse button and type this heading:
Deductions:
Then press the Enter key to complete your entry.

12. In the toolbar, click the down-arrow on the Font Size box and then select 14 from the list, click the
Bold button.
13. Reposition and resize the label box.

CREATING A RECTANGLE
The second unbound control that you are going to place on the form is by draw a rectangle around the
label heading.
To draw this rectangle, follow these steps:
1. In the Toolbox, click the Rectangle button.
2. Position the mouse pointer just above the label heading.
+
3. When you move the mouse pointer it will appear as .
4. Hold down the left mouse button and drag the mouse pointer to surround your heading. Then release
the mouse pointer.
Note:
If the rectangle that you placed in your form hides the heading you created previously, Click the
Format menu and then choose the Send to Back command.
5. Click the Form View button to display your form.

Activity 13 MODIFYING FORM


CHANGING THE LABEL
The following steps show you how to change the labels name.
1. With the Form still active, click the Form View button. To display the Form Design View.
2. Click the Form Maximize button to expand the forms size.
3. Position the mouse pointer on the NDW label and then press the left mouse button. Access
displays a small black square around the text box.
4. Move the mouse pointer inside the NDW label box and then press the left mouse button again.
5. Delete the word NDW and then type Number of Days Worked:
6. Repeat procedure number 4 and 5 to change the label:
Label
Change to
PR
Rate per Day:
GP
Gross Pay:
TD
Total Deduction:
NP
Net Pay:
7. See the result of the revised form.

CALCULATED CONTROL
To display the calculated GP of each Employee in a form, you can add a Calculated control on the Ave
field. A Calculated control uses an expression to define a calculation for the control. Expressions are
combinations of operators (such as + or -), control names, field names, functions, and constants that
returns a value.
The following steps show you how to add a calculated control to the GP field.
In the Form Design Window, click the Gross Pay text box. Access displays a small black square
around the field.
Click the GP field again.
Inside the Text box, delete the GP then type this expression :
=([NDW]*[PR])
Click the TD field again.
Inside the Text box, delete the TD then type this expression :
=([SSS]+[PHIC]+HDMF+WTAX+ADV_VALE)
Click the NP field again.
Inside the Text box, delete the NP then type this expression :
=([GP]*[TD])
Click the Form View button to display the form.

Lesson 11
ADDING OBJECTS AND COMMAND BUTTONS TO A FORM
Objective:
In this lesson, you will learn to create an unbound object to a form using the unbound object control. To
create and to modify the embedded object.
One of the main feature of Access is it enables the user to add objects created in other application to an
Access form For Example, you can add the companys logo that you created with Paint Program or other
graphics program. The type of control used to add picture or object depends whether you want the object
to be bound or unbound.

Understanding OLE
One of the most important features of OLE is its capability to create embedded object. For Example, you
can insert in your form drawings that you created manually in your Paint Program. Another feature of OLE
is that you can create an object and then embed it, or you can embed existing file that contains text,
chart, spreadsheet data, or drawings. The third feature of OLE is that you have the convenience of being
to update it in the original application without the trouble of remembering which object came from which
source programs the embedded object will open the source application every time you double-click the
object.

Adding Unbound Objects


You can insert an unbound object to the Form by using the Unbound Object Frame button on the
Toolbox. When you insert the Object you have a choice of either embedded it into form or linked it to
the original file. The difference is that an embedded object is stored in the form and is always available.
A linked object is stored in the source file, you can edit the object file separately and have the latest
changes appear on your form.
EMBEDDING UNBOUND OBJECT
Using the Unbound Object Frame button on the Toolbox, you can easily embed object. The following
steps show you how to insert an object from Paint Program to Access, if you have a scan logo we can
embed it and place it to your form.
1. Right click Employees Salaries Entry Form and select Design View.
2. Click the Unbound Object button on the Toolbox.
3. Place the mouse pointer on the form. Click where you want to embed the object. The Insert Object
dialog box opens.
4. Open the Paint Program and Open the file for example, HAU.BMP.
5. Then select the Logo and click the Copy button or click Edit menu, then Copy.
6. Select the Microsoft Access at the task bar and since, that you are still in Design View clicks the
Unbound Object.
7. And then click the Paste button or click Edit menu, then Paste.
8. After Copy and Paste the object, adjust the size of the window of the object.
9. Click the Form View button to see the changes that had been created.

CREATING AND EMBEDDED UNBOUND OBJECT


Most Windows applications that support OLE make it easy to create a new object and embed it in the
document. Using the Unbound Object Frame button on the Toolbox, you can easily embed object. The
following steps show you how to embed unbound object in the Employees Salaries Entry Form:
1. Right click Employees Salaries Entry Form and select Design View.
2. Click the Unbound Object button on the Toolbox.
3. Place the mouse pointer on the form. Click where you want to embed the object. The Insert Object
dialog box opens.
4. In the Object type box, select the type of the object that you want to create. For Example, if you want
to create a picture on your form, select the Paintbrush Picture object.
5. Click the OK button. The applications that you choose either will opens or display a window into
which you can create the object.
6. Create the object that you want.
7. After creating the object, adjust the size of the window of the object.
8. Click the File menu, and then click Exit and Return to Employees Salaries Entry Form. The new
object is then embedded in your form.
9. In the Form Design View, click the objects size handle and then adjust the size and proportion of
the object.

EDITING EMBEDDED OBJECT


If you want to edit the embedded object, for example, you want to add new data to it, you can easily do so
by following these steps:
1. In the Form Design View, double-click the embedded to open it.
2. Edit the object.
3. After editing, click File menu and then click Exit and Return to Employees Salaries Entry Form.

DELETING EMBEDDED OBJECT


Deleting an embedded object is easier than creating it. To delete the embedded object just select it and
then press the DELETE key.

CREATING AND LINKING UNBOUND OBJECT


Linking an object is very useful if you plan to use the same object on several forms, but you do not want
to include it in your database file. When you linked the object, you only store the object at once, but if the
linked object file is move, you have to reconnect the link. The following steps show you how to create and
link an object to form.
1. Open the Windows Accessories Paint program.
2. Create the picture that you want.
3. Save the picture by choosing the Save command from the File menu.
4. Close the Paint program.
5. Open the Access program.
6. From the Design View of the Employees Salaries Entry Form, click the Unbound Object and then
click where you want to place the object.
7. In the Insert Object window, click the Create form file button and then type the path to the file. If you
do not know the path, click the Browse button and find where you stored the file.
8. Click the Link check box, and then click the OK button.
9. Wait for a few seconds while Access creates the unbound object frame and displays the object.

Activity 14 CREATING OBJECTS AND ADDING OBJECTS TO A FORM


CREATE A LOGO
PROCEDURE:
1. Create a Logo using the MS Word or MS PowerPoint or Paint Program size 1 height and 1.5
width.

RGB
2.
3.
4.

After creating the logo, Copy the Logo and Paste to the Employees Salaries Entry Form and be
sure that the form must be in Design View.
Click the Form View button to see the changes that had been created.
Add a Title and Type RGB Company. Place beside the Logo.

RGB Company

Activity 15 ADDING COMMAND BUTTONS ON YOUR FORM


If you want to insert another command button aside from the navigation buttons, the following steps show
you how to add a command button to a form.
1. Right click Employees Salaries Entry Form and select Design View.
2. Click the Command Button from the Control Group and then click where you want to place the
button.
3. And be sure that Control Wizard button is activated.
4. The Command Button Wizard appears on your screen, telling you to answer this question: What
Action do you want to happen when the button is pressed? Select the Categories first: Record
Navigation Second selects the action: Go to First Record.
5. Then click the Next button.
6. On the next dialog box, telling you again to answer the next question: Do you want text or picture
on the button? If you choose Text, you can type text to display. If you choose Picture, you can click
Browse to find a picture to display. Select Picture: and select also Go to First.
7. Then click the Next button again to go to next dialog box.
8. The next dialog box, telling you again to answer the next question: What do you want to name the
button? A meaningful name will help you to refer to the button later. Then type First Record. Thats
all information the wizards to create your command button.
9. Last steps click the Finish button. And Access displays the command button with picture.
10. Now add the following command buttons:
A. Go to First Record
B. Go to Previous Record
C. Go to Next Record
D. Go to Last Record
E. Find Record
F. Add New Record
G. Save Record
H. Delete Record
I. Print Record
J. Undo Record
K. Close Form

Lesson 12
CREATING OTHER FORMS
Objective:
In this lesson, you will learn to create a Subform and filter the records on form.

What is a SubForm?
Subform is a form that is displayed within a form. You can think of a form/subform combination as a
hierarchical form, a master/detail form, or a parent/child form wherein the primary form is called the main
form and the form within the form is called subform. Subforms are efficient when you want to display
data from tables or queries with a one-to-many relationship.

Activity 16 CREATING A SUBFORM


Create the Employees Gross Pay Form, attached this from to the Employees Profile Form to create a
subform.

CREATING SUBFORM (EMPLOYEES INCOME FORM)


The following steps show you how to create the Employees Income Form using the Tabular Auto
Form.
1. In the Create tab, click the More Forms and Select Form Wizard.
2. Click the down-arrow button located to the right of the Tables/Queries box, and then select the
Employees Income table from the list. Select the following fields Department, NDW, RPD and
GrossPay. Click the Next button.
3. Select the Tabular Layout and Click Next button.
4. Select the Style that you like and click Next button.
5. Type Employees Gross Pay Form in the Title of the Form. Access generates the form and
displays the records in the Form View window. Click the Form View button to display the forms
design view.

CREATING MAIN FORM (EMPLOYEES PROFILE FORM)


The following steps show you how to create the Employees Profile Form using the Blank Form.
1. In the All Access Objects Window click Employees Info Table. In the Create tab, at Forms
Group and Select Form.
2. Click the View button drop down list and select Design View.

3. After modifying the form, click and drag the Employees Income Form and place it below the
Position Label box and release the mouse.
4. Click the View button drop down list and select Form View to display the records in the Form
View window. And then click the Save button filename: Employees Profile Form.

Filter is a condition you placed on the records in an open form to temporarily separate a subset of
records. After applying the filter, Access will display a record that meets the criteria you have specified.
However, the next time you open the Form; it displays all records until you click the Apply Filter/Sort
command to apply the filter.

Filter Records in a Form


When you are working with a form, sometimes you may need a quick way to filter records. To meet this
need, Access provides your three methods that you can use to filter records-Filter by Form, Filter by
Selection, and Advanced Filter/Sort.

USING FILTER BY SELECTION


The following steps show you how to filter records by using the Filter by Selection.
1. In the Form View Window, select the value that you want to be included in the results of the filter.
For Example, to display only the Employees under the Accounting Department then select the
Accounting from the Department field.
2. Click the
, and then click Equal Accounting. The filtered results display only
the records that contain the selected value.
3. To further limit the set of records, select another value and then repeat step 2.
4. Save this form if you want to save the filter.

USING THE FILTER BY FORM


The following steps show you how to filter a form by using the Filter By Form.
1. In the Form View Window, click the
and then click Filter By Form.
2. Access display the Filter By Form window and opens the Look for Tab, select the field in which
you want to specify the criteria.
3. Select the value from the list or type the value you want the filtered records to contain.
4. To further limit the set of record, select another field and type or select the new value.
5. To specify the alternative values that filtered records can contain, click the Or tab. Select another
filed and enter a new value.
6. Click the
, and then click Apply Filter/Sort.
7. Save this Form if you want to save this filter.

REMOVING A FILTER
After applying the filter, you can display all the records that were previously in the Form by selecting the
.

Lesson 13
CREATING SIMPLE REPORTS
Objective:
In this lesson, you will learn how to create reports using Report and Report Wizard.

Why Create Reports?


Reports are specifically design to be printed and shared with other people. With a report, you can
generate professional results that you can be proud of, whether youre distributing them on paper or
publishing them on the Internet.
Reports are the method by which data can be viewed or printed in an organized and meaningful way.
Because you have control over the size and appearance of a report, you can modify and display the data
the way you want. Creating a report is similar to creating a form. However, reports can only display data.
You cannot use it to input data.

There are several ways to create a report, ranging from easy-but-limited (Report) to difficult-but-veryflexible (Report Design). The intermediate choice is Report Wizard, which offers some flexibility along
with a fairly easy procedure.

Report
Create a basic report of the data in the current query or table, to which you can add features such group
or totals.

Report Wizard
Launch the report wizard which helps you to create simple customized reports.

New Object Report


Create a new blank report in design view. In design view, you can make advanced design changes to
reports such as adding custom control types and writing codes.

Labels
Launch the label wizard to create standard or customized labels.

Using Design View to Create a Report


The Design View method is used if you want to create your own report from scratch without using a
wizard. When you used this method, Access will create a blank report. You will have to drag the fields
and as well as any code that might be needed for the report.

Activity 17 USING REPORT WIZARD TO CREATE A REPORT


The Report Wizard offers a good compromise between ease of use and flexibility. With Report Wizard,
you can use multiple tables or queries and choose a layout and format for your report.
Follow these steps to create a report with Report Wizard.
1. Open the Payroll Database. Click the Create tab and at All Access Objects click Employees Info
Table.
2. Click the Report Wizard.

3.
4.

5.
6.

Multiple Tables/Queries Allowed


You dont need to select a table or query from
the drop down list in the New Report dialog box in step 3 because youll be selecting
tables and queries in step 4 as part of the wizard.
Open the Tables/Queries drop-down list and select the Employees Info table from which you want
to include fields.
Click a field in the Available Fields list, and then click the > button to move it to the Selected Fields
list. Select the following fields EmployeeID, Lastname, Firstname, Middlename, Address, Town/City
and Province.
If necessary, select another table or query from the Tables/Queries list and repeat step 5. When you
finish selecting fields, click Next. The next screen of the wizard appears.
If you want the records grouped by any of the fields you selected, click the field and click the > button.
If you want to select more than one grouping level, select them in the order you want them. Then
click Next to move on.

Grouping?
The Instructions on the screen are bit cryptic. By default, there are no
groups. You have to select a field and click the > button to create a grouping. Grouping
sets off each group on the report. If you select a field to group by, the Grouping Options
button becomes active, and you can click it to specify precise grouping settings.
7. Next youre asked what sort order you want to use. If you want sorted records, open the top dropdown list and select a field to sort by. You can select up to four sorts from the drop-down lists. Then
click Next.
8. The next dialog box enables you to set the Sort order for your report. Click the down-arrow button of
the 1 box, and then select the Lastname field from the list.
9. Using the 2 box, select the Firstname field as the second sort order. Click the Next button.

10.
11.

12.
13.
14.

Ascending or Descending? By default, Access sorts in ascending order (A-Z). Click


the AZ button next to the box to change the sort order to descending (Z-A) if you want.
In the next dialog box, choose a layout option from the Layout area. When you click an option button,
the sample in the box changes to show you what youve selected. Select Tabular Layout.
Choose the orientation for your printed report: Portrait (across the narrow edge of the paper) or
Landscape (across wide edge of the paper). Then Select Landscape Orientation and click the Next
to Continue.
In the next wizard dialog box, youre asked to choose a report style. Several are listed; click one to
see a sample of it. When you're satisfied with your choice, click Next.
In the final step of the report wizard, type Employees Info Report as the name of the report.
Click the Finish button. Wait a few seconds while access generates the report and open the preview
window.

Activity 18 USING REPORT TO CREATE A REPORT


If you want a plain, no-drills report based on a single table or query, Report is for you. You can go back
and improve its appearance later, when you learn about customizing reports in next Lesson.
You can create a Tabular Report. A tabular report resembles a datasheet. To create a report with
Report, follow these steps:
1. Open the Payroll Database. Click the Create tab and at All Access Objects click Employees Info
Table.
2. Click the Report.
3. The report appears in Layout View.
4. Save the report as: Employees Info Tabular

Activity 19 USING REPORT WIZARD CREATING A REPORT BASED ON MORE THAN ONE TABLE
From the previous discussion, you saw how easy it is to create a simple report based on Employees Info
table. Using again the Report Wizard, you can create a report based on more than one table. This
wizard speeds up the process of creating a report that brings data together from more than one table.
The following steps show you how to create a report based on the Employees Info and Employees
Income tables:
1. Open the Payroll Database. Click the Create tab and at All Access Objects click Employees Info
Table.
2. Click the Report Wizard button.
3. Open the Tables/Queries drop-down list and select the Employees Info table from which you want
to include fields.
4. Access displays the first dialog box of the report wizard. Click the > button to move the EmployeeID,
Lastname, Firstname, Middlename, and TIN fields from the Available Fields box to the Selected
Fields box.
5. In the same dialog box, click the down-arrow button key located to right of the Tables/Queries box
and then select the Employees Income table from the list.
6. Click the > button again to move the Department, NDW, PR and GP fields to the Selected Fields
box.
7. In the same dialog box, click the down-arrow button key located to right of the Tables/Queries box
and then select the Employees Deduction table from the list.
8. Click the > button again to move the SSS, PHIC, WTAX, ADV_VALE, and TD fields to the Selected
Fields box.
9. In the same dialog box, click the down-arrow button key located to right of the Tables/Queries box
and then select the Employees Income table from the list.
10. Click the > button again to move the NP fields to the Selected Fields box.
11. After moving the needed fields, click the Next button.
12. Because you want to group the report by Department, select the Department field in the list box and
click the > button. This second step of the report wizard enables you to set the grouping options for
the report. Click the Next button.
13. The next dialog box enables you to set the Sort order for your report. Click the down-arrow button of
the 1 box, and then select the Lastname field from the list.
14. Using the 2 box, select the Firstname field as the second sort order. Click the Next button.
15. In the next dialog box, choose a layout option from the Layout area. Select Stepped Layout. And
then Select Landscape Orientation and click the Next to Continue.
16. In the next dialog box enables you to set a Style for the report. Choose a style that is appropriate
and then click the Next button.
17. In the final step of the report wizard, type Employees Payroll Registry Report as the name of the
report.
18. Click the Finish button. Wait a few seconds while access generates the report and open the preview
window.

USING LABEL WIZARD TO CREATE A REPORT


The Label Wizard is a powerful but easy to use wizard that is used to create standard mailing labels or
other types of labels. Lesson 15 Creating Labels, goes into great detail about creating mailing label in
Access.
Sections of a Report
Report Header
The report header appears once at the beginning of a report. You can use it for items such as
logo, report title, or print date.
Page Header
The page header appears at the top of every page in the report. You use it to display items such
as column headings.
Detail Section
The detail section contains the main body of a reports data. This section is repeated for each
record in the reports underlying record source.
Page Footer
The page footer appears at the bottom of every page in the report. You use it to display items
such as page numbers.
Report Footer
The Report footer appears once at the end of the report. You use it to display items such as
report totals. The report footer is the last section in the report design but appears before the page
footer on the last page of the printed report.
Group Header
By grouping records that share a common value. You can calculate subtotals and make a report
easier to read. A group header appears at the beginning of a new group of records. You use it to
display information that applies to the group as a whole, such a group name, and department and
so on.
Setting up a Report
After creating and viewing the report in the Print Preview window, you are now ready to print it on the
paper. Not quite, you have still to modify how the report will look when it is printed. Follow these steps to
modify the report before printing it.

1. In the Layout View mode, Click Page Setup.


2. In response, Access displays the Page Setup window. This window contains three tabs Margins,
Page and Columns.
3. In the Margin tab, change the page margins if you want to put more data into a page. The sample
preview on the right side of the window changes as you change the margins.

4. Click the Page tab; sets the orientation, paper size and source, and the printer to use for the report.
5. In the Columns tab, set the different field layout properties by changing the number of columns and
the row spacing.
6. Click the OK button.

Lesson 14
CUSTOMIZING A REPORT
Objective:
In this lesson, you will learn how to move and size the controls to make the report more attractive and
readable, to center the heading of the report, and to change controls border width.
Entering Report Design View
When you finish previewing a report youve created, close Print Preview and youre automatically in
Report Design view. If you want to come back to Report Design view later from the Database window,
perform these steps:
1. Right Click the report that you want to modify.
2. Click the Design View button
Report Views
The different options to view reports are Design View, Print Preview, and Layout Preview.

Design View to create a new report or modify the structure of an existing report.
Print Preview shows all the data that will appear on every page of the report.
Layout Preview to quickly look the reports layout but it only includes enough data to show you what
the report will look like.

SWITCHING TO DESIGN VIEW


The following are the methods to switch to the Design View: If you are in Print Preview, click the Close
button to display the reports design. Or, in the Database Window:
1. Click the View button.
2. Select the report you want to view.
3. Click the Design button.
SWITCHING TO REPORT OR LAYOUT PREVIEW
To switch to Report or Layout view make sure you are in the Design View then click the Print Preview
button to view all the data on a report; or, click the Layout Preview button to view the reports layout.
Changing the Appearance of the Report
You can change the appearance of the report by means of moving, sizing, aligning or formatting a control.
The following sections describe how to customize a report.

MOVING AND SIZING CONTROLS


Access provides several tools to manipulate the controls in the Report Design view. After the controls
are added on the report, you can easily move, align, and size them.
You can size or move a control only if it is selected. To select a control simply clicks it. Once it is
selected, you can size it by placing the mouse pointer on one of its size handles and dragging.
Or, you can use the To Fit option from the Size command of the Format menu.
Note:
To select more than one control, hold down the shift key while clicking each control.
To move a selected control, simply place the mouse pointer on the control with its attached label and then
move it.

Activity 20 USING REPORT TO CREATE A REPORT


If you want a plain, no-drills report based on a single table or query, Report is for you. You can go back
and improve its appearance later, when you learn about customizing reports in next Lesson.
You can create a Tabular Report. A tabular report resembles a datasheet. To create a report with
Report, follow these steps:
5. Open the Payroll Database. Click the Create tab and at All Access Objects click Employees
IncomeTable.
6. Click the Report.
7. The report appears in Layout View.
8. Save the report as: Employees Income Report.
CHANGING A LABEL
To change the name of a selected label with a new name, follow these steps:
1. Click the label you want to change.
2. Click inside the selected label.
3. Change the label with a new text.
ALIGNING OF TEXT IN CONTROLS
You can use the alignment buttons on the Toolbar to change the alignment of a selected text in a control.
For example, you might want the heading of your report to appear to the center of a control instead of to
the left.
To center the Employees Income Report heading, follow these steps:
1. Click the Employees Income Report control.
2. On the Formatting Toolbar, click the Center button to center the text.
CHANGING BORDER WIDTH
When you create a form or report, Access automatically surrounds the controls with a border. The default
controls border width setting is hairline, but you can easily change it by using the Border Width property
setting which range from 0 to 6 points.
To change the Employees Income Report width, follow these steps:
1. Click the Employees Income Report control.
2. Press F4 To display Property Window.
3. In the Property dialog box, click the vertical scroll bar until you find Border Width option.
4. Click the Border Width box, and then click the down-arrow button.
5. From the list, select the new border width that you want.

Lesson 15
CREATING MAILING LABELS
Objective:
In this lesson, you will learn how to make mailing labels using names and address in a database.

Easy Mailing Labels with Access


If you have ever done mass mailings to club members, customers, or even friends, the worst part was
probably addressing all those envelopes. Most Word processors (such as Word) have mailing label
features that enable you to create mailing labels from a list of names, but Access is even better: it lets you
create mailing labels directly from an address book database (or any other database).
Many times in a corporation, they need to mail a letter to all of their customers. Given a database that
contains customer records (Name, Address, Town/City and Province), you can easily create mailing
labels. Access provides a powerful and easy-to-use Label Wizard that allows you to design a mailing
label.
To create a mailing label from Employees Info table, determine the followings:
First, examine the fields contained in this table;
Second, decides which field goes to the label;
And third, determine the format of the label.
Examining the Employees Info table, you can see that the label should contain the following lines:

Lastname, Firstname Middlename


Address
Town/City, Province

Activity 21 CREATING MAILING LABEL WITH THE LABEL WIZARD


After determining the format of the label, you are now ready to create a mailing label.
1. Open the Payroll Database. Select the Employees Info table and click the Create tab.
2. Click Labels button.
3. The first screen of the label Wizard appears. In this dialog box, access displays a predefined set of
label sizes and Select the Product Number 5160 from the list.
4. Click Sheet feed or Continuous. (Sheet-Fed labels are single sheets; continuous labels are joined to
the previous and next sheet at the top, and they have perforated strips on the side that feed through a
dot-matrix printer.) And then click the Next button.
5. Next youre asked about the appearance of the text. Choose a font from the Font Name drop-down
list, and choose a font size from the Font Size drop-down list.
Dont Make the Font Too Big! If you need to print multiple lines on each label, make
sure that the font size you select is small enough that all lines will fit. For mailing labels,
8 or 10 point type works well: it is large enough to be read by U.S. Postal Service
machines, but its small enough that you can fit several lines on each label.
6. With some fonts, you can choose a font weight. Open the Font Weight drop-down list and choose a
different weight if you want. Normal will work well in most cases.

7. If you would like color labels (and you have a color printer), choose a different color from the Text
Color List. To do so, click the button next to the Text Color box, choose from the Color dialog box
that appears, and then click OK to return.
Avoid Light Colors!
If youre making labels to be sent through the U.S. Postal
Service, keep in mind that their machines cant read light-colored ink such as yellow or
pale pink. Choose a dark color to ensure that your addresses will be read correctly.
8. Click the Italic and/or the Underline check box if you want the text formatted with either or both of
those attributes. Then click Next> to continue.
9. In the next dialog box, you are going to create a template for your labels. As you can see this box
contains a list box called Available fields and another box called Prototype label. To create the
template for your labels, follow these steps:
Select the Lastname field in the Available field list and then click the > button. Type, and press
the Spacebar key.
Select the Firstname field in the Available field list and then click the > button. Press the
Spacebar key to create a space.
Select the Middlename field in the Available field list and then click the > button.
Press the Enter key.
Select the Address field in the Available field list and then click the > button.
Press the Enter key.
Select the Town/City field in the Available field list and then click the > button. Type, and press
the Spacebar key.
Select the Province field in the Available field list and then click the > button.
10. Click the Next button.
11. In the next dialog box, you can specify the sort key of the mailing labels. You can sort the labels by
one or more fields. To sort the mailing labels, select the Lastname field as the sort key and then click
the > button. Select the Firstname field and then click the > button again. This process tells Access
to sort the mailing label by Lastname and then by Firstname. Click the Next button to move to the
last dialog box in the Label Wizard.
Order Is Important!
If you pick more than one field to sort by, Access sorts the
records first by first field you select, then by the second, and so on. So its important to
choose the field first that you want to sort by first. If theyre in the wrong order, click the
<< button to remove them all from the Sort By list, and then start over.
12. In the last screen, youre asked for a title or name. Enter Employees Info Label and click the
Finish. Your labels appear in Print Preview, just like any other report.

Printing Labels
You can print by clicking the Print button, or you can close the Print Preview box by clicking the Close
button.

Modifying Your Labels


If you want to modify the labels, you can enter Report Design view and make changes just as you would
with any report. Just click the labels on the Reports tab, and then click Design. Your label design
appears. Use all the same editing techniques that you learned in Customizing a Report, to make
changes to your label.
Editing a Mailing Label
After creating a mailing label, you can make minor changes to it by changing the font type and size of the
text in the controls and by changing the size of controls. However, if you want to make major changes to
the label it is much better to create a new label than to edit it.

CHANGING THE FONT TYPE AND SIZE OF TEXT


To change the font type and size of text in the controls, follow these steps:
1. Right click Employees Info- Labels and then click the Design View button.
2. In response, Access displays the label in the Design View. Click the control that contains the text you
want to change.
3. In the Formatting toolbar, click the down-arrow button on the Font Name box and then select the font
you want.
4. To change the font size, click the down-arrow button on the Font Size box and then select the size
you want.
CHANGING THE SIZE OF CONTROL
The following steps show you how to resize a control.
1. In Design View, click the control you want to resize.
2. Drag the sizing handle.

Lesson 16
CREATING MAIN SWITCHBOARD
Objective:
In this lesson, you will learn how to create main switchboard and adding graphics in switchboard.

Create and manage a switchboard form


When you use the Local Templates to create a database, Microsoft Access automatically creates a
switchboard that helps you to navigate around the database. This switchboard has buttons that you can
click to open forms and reports (or open other switchboards that open additional forms and reports), quit
Microsoft Access, or customize the switchboard. You can create a switchboard similar to the one that
the Local Templates creates by using the Switchboard Manager.

What do you want to do?


1.
2.
3.
4.
5.

Create a switchboard form by using the Switchboard Manager.


Create a new switchboard that you can open from the opening switchboard
Make a change to an existing switchboard
Change which switchboard is automatically displayed when you open the database
Delete a switchboard

Create a switchboard form by using the Switchboard Manager


When you use the Database Wizard to create a database, the wizard creates a switchboard that makes it
easy to navigate between the Forms and Reports in your database. If you want to build the same type of
switchboard for a database you created yourself, you can use the Switchboard Manager.
1. Click the Database Tools tab, at the Database Tools Group and then click Switchboard Manager.
2. If Microsoft Access asks if you'd like to create a switchboard, click Yes.
3. In the Switchboard Manager dialog box, click the New button.
4. In the Create New Window type Forms Switchboard at the Switchboard Page Name: and click the
OK button.
5. Repeat Step 4-5 In the Create New Window type Reports Switchboard at the Switchboard Page
Name: and click the OK button.

Activity 22 CREATING A SWITCHBOARD ITEM AT THE MAIN SWITCHBOARD


1. Open the Payroll Database. Click the Database Tools tab, at the Database Tools Group and then
click Switchboard Manager.
2. In the Switchboard Manager Window. Select Forms Switchboard and then click the Edit button.
3. In the Edit Switchboard Page Window. Click the New button.
4. In the Edit Switchboard Item. Type the Enter/View Employees Information in Columnar in the
Text: Box.
5. In the Command: Box, click the drop-down list button and select Open Form in Edit Mode.
6. In the Forms: Box click the drop-down list button and select Employees Info-Columnar and click the
OK.
7. Repeat Step 2-5 based on the given table below. Until youre through with Forms Switchboard and
click the Close button to close the Edit Switchboard Page Window.

8. And then you can continue with Reports and Main Switchboard with the same procedures, repeat
Steps 1-6.

Table Switchboard Manager


SWITCHBOARD PAGE
Main Switchboard

Forms Switchboard

Reports Switchboard

SWITCHBOARD ITEM
Enter/View Information
Preview Reports
Change Switchboard Items
Exit this database
Employees Information
Employees Salaries Entry
Return to Main Switchboard
Preview Employees Payroll
Registry Report
Preview Employees Info Report
Preview the Labels Employees
Info
Return to Main Switchboard

COMMAND
Goto Switchboard
Goto Switchboard
Design Application
Exit Application
Open Form in Edit Mode
Open Form in Edit Mode
Go to Switchboard
Open Report

OBJECTS
Forms Switchboard
Reports Switchboard

Open Report
Open Report

Employees Profile
Employees Salaries Entry
Main Switchboard
Employees Payroll
Registry Report
Employees Info
Employees Info - Label

Go to Switchboard

Main Switchboard

Startup Application is used whenever you open your database it will open the main switchboard.

Activity 23 CREATING A STARTUP APPLICATION BASED ON THE MAIN SWITCHBOARD


Follow these steps to create a startup application:
1. Click the Office button and select Access Options in order to display Start Application.
2. In the Startup Window type Main Menu Payroll Database in the Application Title: box.
3. In the Display Form: box, click the drop-down list button and then select Switchboard and then click
the OK button.
4. To check if it is start on the Main Switchboard, close the Database and then open the Payroll
Database again.

Das könnte Ihnen auch gefallen