Escolar Documentos
Profissional Documentos
Cultura Documentos
Office 2007
WORKBOOK THREE
Exercise 1
New database
Filename: Crop database
Field Sizes
Data Type
Field Sizes
Variety
Name
Code No
Crop Time
Text
Text
Text
Text
20
20
4
10
Close table
Create New Table 2 within the same database. Save it as Crop Prices
Field Sizes
Data Type
Field Sizes
Code No
Page Ref
Amount Sold
Price
Text
Number
Number
Currency
4
Long Integer
Long Integer
2 places decimals
Kelly Connaghan
Page 1 of 13
Module 5 DATABASE
Office 2007
WORKBOOK THREE
Input Data
Table 1 (Crop Varieties)
(for the tables you can import them from note pad. Go to the External Data
tab and click on text file. The first table is saved as cropv and the second
as cropp. Import them into your database to save time)
Variety
Name
code_no
Annabel
The Prince
Masterpiece
Spring Hero
Cosair
Cardinal
Rocket
Campestar
Tom Thumb
Lakeland
Valdor
Meteor
Little Marvel
Onward
3088
3097
3092
3333
3357
3389
3393
3390
3681
3677
3706
3009
3007
3062
Harvest
Time
Summer
Summer
Summer
Spring
Winter
Spring
Spring
Autumn
Summer
Summer
Winter
Autumn
Spring
Summer
Kelly Connaghan
Brochure Ref
Amount Sold
Price
Page 2 of 13
Module 5 DATABASE
3088
3097
3092
3333
3357
3389
3393
3390
3681
3677
3706
3009
3007
3062
Office 2007
62
63
64
65
68
69
70
71
72
72
74
77
77
79
Close table
WORKBOOK THREE
100
250
200
160
130
255
300
425
120
80
360
250
300
120
0.85
1.15
1.02
1.22
1.29
1.39
0.98
0.75
0.52
0.79
0.66
0.92
1.02
0.89
Relationships
Create a relationship between the 2 tables
Click on Database Tools and choose Relationships. Add both tables as seen
below
Kelly Connaghan
Page 3 of 13
Module 5 DATABASE
Office 2007
WORKBOOK THREE
When both tables have been selected, close the window. Click in Code No
from the first table and drag into Code No in the second table. This will
bring up the following window.
Click Create and a line will now join the 2 tables. There is now a relationship
between the 2 tables.
Perform New Query as usual to find all Spring Varieties; add both tables
to the grid
Fields to show in this order:
Kelly Connaghan
Page 4 of 13
Module 5 DATABASE
Office 2007
WORKBOOK THREE
CropTime,
Code Number, (from either table)
Name,
PageRef,
Price
Criteria: Crop Time: Spring
Use the same query in Design View and change criteria for the following
query.
Report
The following steps will enable you to produce a Report, based on the 2
tables, using the Report Wizard.
A Query must be created first so that the required fields from the 2 tables
will be available.
Kelly Connaghan
Page 5 of 13
Module 5 DATABASE
Office 2007
Run Query
WORKBOOK THREE
Forms
A form is a database object that you can use to enter, edit, or display data
from a table or a query. You can use forms to control access to data, such as
which fields or rows of data are displayed.
Create a form for the Crop Varieties table using the wizard
Kelly Connaghan
Page 6 of 13
Module 5 DATABASE
Office 2007
WORKBOOK THREE
Choose the crop variety table, use all of the fields, and choose Columnar
Style
Choose any style for the form, and enter the name frmcropvarieties
Use the forms to view the records in the table
On the toolbar at the bottom, click on the New Record icon
Last Record
New Record
Next record
Ice Berg
3100
Summer
Click on the crop varieties table to see the record has been entered (you
may need to close the form and table and reopen to see the new record)
Using the same method as before, create a form for the Crop prices table
and enter the following new record
3100
78
350
0.89
Exercise 2
Kelly Connaghan
Page 7 of 13
Module 5 DATABASE
Office 2007
WORKBOOK THREE
This exercise represents an extract from a Travel Agency database and the
creation of 2 related tables
Field Name
Tour No
Data Type
AutoNumber
Resort
Hotel
Days
Text
Text
Number
Prices From
Currency
Description
Number in
brochure
Name of Resort
Name of Hotel
Number of days
tour lasts
Minimum charges
Field Size/Format
Long Integer
20
15
Long Integer
2 Decimal Places
ENTER DATA
Hotel
Days
Prices
Hunstanton
Cromer
Sheringham
Royal
Viking
Lyton Court
8
8
8
103
109
95
Kelly Connaghan
Page 8 of 13
Module 5 DATABASE
Hunstanton
Gt Yarmouth
Cromer
Hunstanton
Cromer
Office 2007
Devon Towers
Southdown
Midland
Manchester
Majestic
8
9
8
7
7
WORKBOOK THREE
97
127
105
111
127
Change widths
Save Structure
Save
Manipulation of data
Print Datasheet
Change Font
Kelly Connaghan
Page 9 of 13
Module 5 DATABASE
Home Tab
Font
Choose Arial 12
Print datasheet
Office 2007
WORKBOOK THREE
Field name
Type
Description
Field Size
Tour No (replace
the text in the
ID field with
this)
Bookings
AutoNumber
Number in
brochure
Long Integer
Number
Long Integer
Full
Yes/No
Number of
bookings made
Whether fully
booked
Yes/No**
Save button
Enter data
Switch to Datasheet view - click datasheet view button
(TOUR NO completed automatically -)
Records are also available in the excel spreadsheet State of bookings
Kelly Connaghan
Page 10 of 13
Module 5 DATABASE
Office 2007
WORKBOOK THREE
Tour No
Bookings
Full
1
2
3
4
5
6
7
8
23
30
50
15
65
50
42
33
No
No
Yes
No
Yes
Yes
No
No
Change Font
Arial 12
Save the table
Print datasheet
Close table
Simple Query 1
Kelly Connaghan
Page 11 of 13
Module 5 DATABASE
Office 2007
WORKBOOK THREE
The 2 tables have a common field - TOUR NO. This enables you to join the
tables to create a larger table with more possibilities
Create a new query in design view and add both tables to the grid
Add the fields TOUR NO, FULL and RESORT to the grid.
Simple Query 2
Find any Hunstanton Tours which still has room
Show TOUR NO, HOTEL, RESORT, Full and PRICE fields only (although you
are not going to show FULL field you will need to insert it into the grid as
you are going to use it for one of the criteria)
Uncheck Show box in FULL column (this field will not now show)
Kelly Connaghan
Page 12 of 13
Module 5 DATABASE
Office 2007
WORKBOOK THREE
Run Query
Save Query - List of Hunstanton Hotels with vacancies
Print result of query to show the hotels which are not yet full (Printout
8)
Close Query
Close database file and assemble your printouts
Report
Create a report based on the tour details table, with the grouping level set
for Resort
Landscape
Save the report as rpttourdetails
Close down the database
Kelly Connaghan
Page 13 of 13