Ms Access Notes
Ms Access Notes
ke 0713779527
- 113 -
www.arena.co.ke 0713779527
DATABASE TABLES.
A Table is a collection of data about a specific topic.
- 115 -
www.arena.co.ke 0713779527
- 116 -
www.arena.co.ke 0713779527
- 118 -
www.arena.co.ke 0713779527
- 119 -
www.arena.co.ke 0713779527
- 121 -
www.arena.co.ke 0713779527
- 122 -
www.arena.co.ke 0713779527
Exercise (a).
1. (a). Define the following terms as used in Database Management systems:
(i). Table.
(ii). Field.
(iii). Field Name.
(iv). Field Type.
(v). Record.
(vi). Database File.
(b). Give five different field data types found in Microsoft Access and explain each.
2. What are the procedures you have to follow when designing a database?
Exercise (b).
1. Differentiate between:
(a). Table and Record.
(b). Field and Field name.
2. Create a simple record of a company, having the following fields; Company’s Name,
Address, City, State, and Phone number.
3. Create a Personal records database giving the following details; Father’s Name, Baptismal
Name, Last Name, Origin, Sex, Date of Birth, Age, Primary and Secondary schools attended,
College, Career and Hobbies.
Include the relevant field data types and formats.
4. Create a database giving the following details; Name of company, Address, Phone number,
Years of existence, Location, Number of employees, and what it does (operations).
5. Create a database of an employer who decides to keep a record of all his employees, under
the following lines; Name of employee, Sex, Age, Origin, Date he/she was employed, Salary,
Department of work, Working hours for each employee, Marital status, Education level, and
ID card number.
6. A farmer decides to keep a record of his farm produce of a certain season. Create a database
showing the following; Name of grain, Produce in tonnes.
COPY OR MOVE AN ITEM.
1. Select the items you want to copy or move.
To copy the item, click Copy on the Edit menu or on the toolbar.
To move the item, click Cut on the Edit menu or on the toolbar.
2. Click the location where you want to place the item.
3. Click Paste on the Edit menu or on the toolbar.
Copying a table.
Copying can be used to reproduce tables and/or data within tables.
1. Select the table in Datasheet view.
2. Click Copy on the Edit menu or on the toolbar.
3. Click the location where you want to place the item.
4. Click Paste on the Edit menu or on the toolbar.
Access will then ask you to enter a name for the new table. It will then ask whether you want
to paste the structure and data or just to append the database records.
Appending refers to adding records at the bottom of an existing table or file.
To append the records, choose Paste Append on the Edit menu.
SORTING OF RECORDS.
- 124 -
www.arena.co.ke 0713779527
PRINTING.
Setting up the paper.
You can change the Page Setup for your table to affect the way it will print.
1. On the File menu, choose Page Setup.
2. From the Page Setup dialog box,
Click the Margins tab, to change the margins of the printing page. To include the
headings in the printed document, select the Print Headings checkbox.
Click the Page tab, then change the Orientation of the paper, and the Paper size.
Actual Printing.
Before you sent the job for printing, make sure you have set the print options you want to apply
to your print job.
1. On the File menu, choose Print (or press CRTL+’P’).
2. From the Print dialog box,
Under Printer, click the arrow next to the Name box, then select the printer you are using.
Under Print range, select the specific pages to print.
To print only certain records in the datasheet, select the records, then click Selected
Record(s).
In the Number of Copies box, select the desired copies to be printed per page.
To change the Print Quality, Paper Type, Paper Size and Orientation, click Properties.
3. After setting the options, choose OK to send the print job to the printer.
- 127 -
www.arena.co.ke 0713779527
A Product Key - A unique ID, such as a Customer ID, that distinguishes one record from
another within a table.
In the Suppliers table, enter a Supplier ID, Company name, and so on, for each supplier. The
Suppliers ID is the primary key.
In the Products table, you include the Suppliers ID field, so that when you enter a new product,
you can identify its supplier by entering that supplier's unique ID number. The Suppliers ID is
the foreign key in the Products table.
- 128 -
www.arena.co.ke 0713779527
Exercise (b).
1. (a). What are Database management software?
- 129 -
www.arena.co.ke 0713779527
QUERIES.
A Query is a question about the data stored in your tables, or a request to perform an action on
the data.
You use queries to view, change, and analyze data in different ways.
A query can find & bring together data that meets conditions that you specify from multiple
tables. It can also serve as the source of data for a Form, or a Report.
A query can also update or delete multiple records at the same time, and perform predefined or
custom calculations on your data.
There are 4 major types of queries in Microsoft Access.
(1). SELECT QUERIES.
- 130 -
www.arena.co.ke 0713779527
Design grid: The grid that you use to design a query or filter in query Design view or in
the Advanced Filter/Sort window.
- 131 -
www.arena.co.ke 0713779527
- 132 -
www.arena.co.ke 0713779527
Calculate amounts
You can add the values in a field or do other computations with the data by specifying the type of
calculation to perform.
• Use an aggregate function, such as Sum or Avg, to calculate one amount for all the records in
each field in the design grid.
Aggregate function - A function, such as Sum, Count, Avg, or Var, that you use to calculate
totals.
• Use Group By to calculate separate amounts for groups of records in a field.
Sort records.
You can sort the query's results by specifying a sort order in the design grid.
You can Sort by Ascending or Descending order, or remove a sort.
- 134 -
www.arena.co.ke 0713779527
Set the no. of decimal places to display for a field in query Design view.
1. Open a query in Design view.
2. In the query design grid, place the insertion point in the column for the field you want to
change.
3. Click Properties on the Query Design toolbar to
4. On the General tab, click the arrow next to the DecimalPlaces property box, then click the
desired no. of decimal places.
FORMS.
A Form is an Access database object on which you place controls for taking actions or for
entering, displaying, and editing data in fields.
A form is a type of a database object that is primarily used to enter or display data in a database.
To easily view, enter, and change data directly in a table, create a form. When you open a form,
Microsoft Access retrieves the data from one or more tables, and displays it on the screen with
the layout you choose in the Form Wizard, or with the layout that you created on your own in
Design view.
Notes.
- 135 -
www.arena.co.ke 0713779527
- 136 -
www.arena.co.ke 0713779527
REPORTS.
A Report is an Access database object that prints information formatted and organized according
to your specifications. Examples of reports are sales summaries, phone lists, and mailing labels.).
To analyze your data or present it a certain way in print, create a report. For example, you might
print one report that groups data and calculates totals, and another report with different data
formatted for printing mailing labels.
Use a report to create mailing labels.
Use a report to show totals in a chart.
Use a report to calculate totals.
A report is an effective way to present your data in a printed format. Because you have control
over the size and appearance of everything on a report, you can display the information the way
you want to see it.
Most reports are bound to one or more table and query in the database. A report's record source
refers to the fields in the underlying tables and queries. A report need not contain all the fields
from each of the tables or queries that it is based on.
A bound report gets its data from its underlying record source. Other information on the form,
such as the title, date, and page number, is stored in the report's design.
You create the link between a report and its record source by using graphical objects called
controls. Controls can be text boxes that display names and numbers, labels that display titles, or
decorative lines that graphically organize the data and make the report more attractive.
Creating a report
You can create different types of reports quickly by using wizards. Use the Label Wizard to
create mailing labels, the Chart Wizard to create charts, or the Report Wizard to create a
standard report. The wizard asks you questions and creates a report based on your answers. You
can then customize the report the way you want it in Design view.
Customizing a report
You can customize a report in the following ways:
Record source Change the tables and queries that a report is based on.
Sorting and grouping data You can sort data in ascending or descending order. You can also
group records on one or more fields, and display subtotals and grand totals on a report.
Report window You can add or remove Maximize and Minimize buttons, change the title bar
text, and other Report window elements.
Sections You can add, remove, hide, or resize the header, footer, and details sections of a
report. You can also set section properties to control the appearance and printing of a report.
- 137 -
www.arena.co.ke 0713779527
- 138 -