Solving a Mystery/Creating an Access Database

advertisement
“A Who Done It”
For Microsoft Access Database
Beth Meyer
You are the local official for the area and you just learned how to use Microsoft Access. You
decided to create a database of known trouble makers in your district (just in case). You will use
the information you have entered into Microsoft Access to help solve a case of Who Done It.
You will be given a collection of information about trouble makers that you will include in the
database, and it is your job to search the database to find out who the trouble maker really is.
First, you must set up the database.
Directions:


Open Access (Go to start, choose programs, and then Microsoft Access).
When the dialog box opens, go to the Menu Bar and Click on File Click on New. This
screen will appear on the right side choose Blank Database.

Another dialog box will open. On the file name line, type WhoDoneIt (replacing db1).
This is a very critical step. This is where you are actually saving the file to your folder!!!

Choose your folder to save it to, then click Create on the right side of the dialog box.

A new dialog box will open up Double Click on Create table in Design view.

Type the following information in the Table under its appropriate column. To set your
field size, click on data type and box will appear at the bottom of your field box. The
field size is automatically set at 50. You can leave the field size at 50, or adjust the field
size accordingly.
When
done
typing
the fields
Click on
this X
This dialog
box will
appear click
the Yes button
When you click Yes to save your Table name the Table:
TroubleMaker Info
then click OK
This new dialog box will appear click Yes. The Primary Key will automatically become the first
record and will insert a number automatically.
Designing a Form:
Now you will design a Form for entering information into the table.



In the Database window, click Forms in the Objects Column.
Double click on Create Form Using Wizard.
Select all of the fields by clicking the button with two arrows, circled below. You will
see that all the fields automatically appear in the right column.









Click next.
Select the column layout
Click next, then select a form type you like
Click next.
Title your form TroubleMaker Info.
Click modify the forms design radio button
Click on the title ID press the delete key, Click on the other ID field press the delete key
You can move the field where you like. To drag objects, you must click on them (you
will see a small hand appear which is used to move the object on the page).
When you have the fields moved click on the View button which is circled on the dialog
box.

This Screen will appear where you will begin typing in the suspect’s information.
Enter the following information about each of the suspects. Use the Tab key to move from field
to field. If your Suspect wears glasses you have to use your mouse to check the box next to the
field name Glasses.
Gender
Hair
Color
John Johnson
Boy
Blonde Short
Tall
Beth Jefferson
Girl
Red
Long
Average Heavy
Raul Casanova Boy
Black
Curly
Tall
Ahmad Rashad Boy
Brown
Shoulder
Short
Length
Latisha Benz
Girl
Red
Long
Trevon Jordan
Boy
Shante
Williams
William
Dickenson
Name
Hair
Type
Height Weight Glasses
Thin
No
No
Average Yes
Average Yes
Average Thin
No
Brown Afro
Tall
No
Girl
Blonde Short
Average Average No
Boy
Blonde Afro
Short
Heavy
No
Grace Edwards Girl
Black
Curly
Short
Thin
No
Niqo Spreewell Boy
Black
Curly
Tall
Thin
Yes
Joe Bankers
Boy
Red
Short
Average Average No
Craig Holub
Boy
Brown Short
Short
Heavy
Average No
Mustafa Shakur Boy
Brown
Shoulder
Average Thin
Length
Yes
LeNeal Jones
Boy
Black
Afro
Short
Heavy
Yes
Mei Lynn
Chong
Girl
Black
Long
Short
Thin
Yes
Now that you have entered all of the suspects into your database you will need to exit this screen
you will do that by clicking on the circled X in the right upper corner.
This new dialog box will appear Click Yes to save your information.
You will now generate a query in order to determine who the actual trouble maker is. A query is
a set of criteria you specify to retrieve certain data from a database.
First, you will need to determine the fields you will need to use. Read the Who Done It below;
then follow the directions for completing a query.
Who Done It:
It was a warm fall night everyone was gathered at the Middle School Gym to watch the
basketball game. The bleachers were packed and the smell of popcorn filled the air. Everyone
was excited that our team had made it to the finals and it was a home game. The first half went
great we were leading by 10 points when the players went to the locker room. Third quarter did
not go so well we were down by 12 points as we moved into the fourth quarter. We scored 6
points right off and it looked like we had gotten our momentum back when all of sudden the
lights went out. The audience all groaned at once, the game had gotten so exciting again and this
had to happen. The announcer said please stay in your seats it seems that someone turned out the
gym lights we will have them back on in a minute. The lights came back on and everyone
clapped and the game continued with our team winning by only one point. Wow what a night.
But Who Done It, who shut out the lights. You being the local official were called in as soon as
lights came on to start your investigation.
Upon arrival at the gym you began interviewing people who were near the light switch to the
gym and this is what you learned.
Mrs. Jones said, "I saw someone by the light switch that was tall.”
Little Freddie agreed, “I saw someone tall and they had Curly hair.”
Angela said, “I saw someone too, they were wearing glasses.”
Mr. Smith said, “I believe I saw someone over there that was thin.”
Mark said, “I saw someone that had black hair.”
After talking to a few more people you found that the same description was being given so you
headed back to your office to enter the description in you Trouble Maker Database. But, in order
to do this you needed to create a query that will pull out the most likely trouble maker. Follow
the steps below to create your query.
Creating a Query:
Click on the Queries option in the Objects Column and then double click on Create query by
using wizard.
The following dialog box will appear click on the double arrows to select all of the fields. Click
the Next Arrow at the bottom.
A new dialog box will appear just click Next.
When the new dialog box appears click on Modify the query design and then Click Finish
This screen will appear:
Now we can type in the clues we received from the different people you interviewed. Below is
the conversation again.
Mrs. Jones said, "I saw someone by the light switch that was tall.”
Little Freddie agreed, “I saw someone tall and they had Curly hair.”
Angela said, “I saw someone too, they were wearing glasses.”
Mr. Smith said, “I believe I saw someone over there that was thin.”
Mark said, “I saw someone that had black hair.”
You will need to type the clues into the Criteria area of each field. The one of the clues is shown
below:
Now fill in the other clues in the proper Criteria areas of each field. When you have completed
entering the suspects criteria click on the
and enter the trouble maker’s name on the rubric.
The trouble maker was brought in for questioning, they admitted to standing by the light switch
but …..
After writing down the person you thought did it you will need to prepare for the second case
click the Design View button in the left hand corner.
Now read the case below and fill in the new clues in the Criteria area.
Who Done It Part 2
The trouble maker you thought did it admitted to being by the light switch, so case closed, right?
No, I am afraid not new evidence has been presented to you. The switch the original trouble
maker was by does not work. New evidence states the person who pulled the real switch had
long red hair, they were of average height and heavy set and they did not wear glasses.
Now you have to enter the new criteria for the trouble maker and see who really did it.
Follow the steps for Part 1 to complete Part 2. Write your answer on the rubric.
Name:______________________________________
Hour:________________
Access Database Mystery Rubric
Answer to Query 1 Mystery:_______________________________________________________
Answer to Query 2 Mystery:_______________________________________________________
Point Value
for Grade
40-36
A
35-32
B
31-28
C
27-24
D
23 - 0
F
Table includes all fields.
Correct data type is used for all fields.
Description is present for all fields.
Spelling Errors 1 point subtracted for each error
Form created
All records are included in table
Query one has the correct suspect
Query two has the correct suspect
Total
2
1
2
10
1
20
2
2
40
Name:______________________________________
Hour:________________
Access Database Mystery Rubric
Answer to Query 1 Mystery:_______________________________________________________
Answer to Query 2 Mystery:_______________________________________________________
Point Value
for Grade
40-36
A
35-32
B
31-28
C
27-24
D
23 - 0
F
Table includes all fields.
Correct data type is used for all fields.
Description is present for all fields.
Spelling Errors 1 point subtracted for each error
Form created
All records are included in table
Query one has the correct suspect
Query two has the correct suspect
Total
2
1
2
10
1
20
2
2
40
Download