4.
Structure of Table 1 with commands
Design View of Employee Table
5. Structure of Table 2 with commands
Design View of Salary Table
-4-
6. Creation of a Query with commands
The Query helps us to extract specific information from the database. It is
like asking a question to the Access and finding out the answer.
Creating a Query:
Step 1: Click the Query tab in the Database window.
Step 2: Click the New button on the Database window
toolbar.
Step 3: In the New Query dialog box, select Design View.
Step 4: Click OK.
Step 5: In the Show Table dialog box that opens, select
the tables
we want to include in our Query, clicking Add after
each.
Step 6: After we have added all the tables we want
included, click
Close.
Step 7: Double click a field in the field box in the upper
portion of
the select Query dialog box to add it to the query
design
grid.
Step 8: The Show check boxes in the grid should be
checked for all
the fields that we want to display in the resulting
datasheet.
Step 9: To sort the records in the resulting datasheet,
click for the
Field that we want to sort and then select
Ascending or
Descending from the drop-down list.
-5-
7. Creation of a Form with commands
The Form makes it easy for us to select for our Form from more than one
table or Query.
Creating a Form:
Step 1: Click the Forms tab in the Database window.
Step 2: Click the New button on the Database window
toolbar.
Step 3: In the New Form dialog box, choose a method
from the
list.
Step 4: If we choose one of the Auto Forms, select a
table or query
from the pull-down list.
Step 5: Click OK. The Auto Form wizard creates a Form in
the
default style, using all fields defined in the table.
Step 6: The Design View option in the New Form dialog
box
displays a blank Form in Design View, with the
Forms
toolbar box available for adding controls.
8. Creation of a Report with commands
A Report will print our database in a format, which looks best on the paper
using the printer attached to our computer. This is no doubt the quickest
way of creating a Report.
Creating a Report:
Step 1: Click the Report tab in the Database window.
Step 2: Click the New button on the Database window
toolbar.
Step 3: In the New Report dialog box, select AutoReport
Columnar and select a table or query on which to
base the
Report.
Step 4: Click OK.
Step 5: The report is displayed in the Print Preview.
9. Records of Table 1
Validations:
1. Employee code field (Emp Code) has to be unique for every record in the
table. It cannot have NULL value. The value of this field must be entered.
2. Department field may have only one of the values from Production,
Computer, Personnel and Marketing.
3. Designation field may have any one of the Values from Manager, Executive
and Clerk.
10. Records of Table 2
Validations:
1. Employee code field (Emp Code) has to be unique for every record in
the table. It cannot have NULL value. The value of this field must be
entered.
2. Number of days worked (Days Worked field) and Number of Leaves
Avail (Leave Avail field) in a month cannot be more than 31.
11. Output of the Query
Employee Table
Output of the Query
Salary Table
-9-
12. Output of the Form
Employee Table
Output of the Form
Salary Table
-10-
13. Output of the Report
Employee Table
Output of the Report
Salary Table