SlideShare una empresa de Scribd logo
1 de 29
INTRODUCTION TO ACCESS
*
OBJECTIVESDefine the terms field, record, table, relational
database, primary key, and foreign keyCreate a blank
databaseIdentify the components of the Microsoft Access
windowCreate and save a table in Datasheet viewEnter field
names and records in a table datasheetOpen a table using the
Navigation Pane
*
OBJECTIVESOpen an Access databaseCopy and paste records
from another Access databaseNavigate a table datasheetCreate
and navigate a simple queryCreate and navigate a simple
formCreate, preview, navigate, and print a simple reportLearn
how to manage a database by compacting, backing up, and
restoring a database
*
ORGANIZING DATAYour first step in organizing data is to
identify the individual fieldsThe specific value, or content, of a
field is called the field valueA set of field values is called a
recordNext, you group related fields together into tables
*
DATABASES AND RELATIONSHIPSA collection of related
tables is called a database, or a relational databaseYou connect
the records in the separate tables through a common fieldA
primary key is a field, or a collection of fields, whose values
uniquely identify each record in a tableWhen you include the
primary key from one table as a field in a second table to form a
relationship between the two tables, it is called a foreign key in
the second table
*
DATABASES AND RELATIONSHIPS
*
RELATIONAL DATABASE MANAGEMENT SYSTEMSA
database management system (DBMS) is a software program
that lets you create databases and then manipulate data in
themIn a relational database management system, data is
organized as a collection of tables
*
EXPLORING THE MICROSOFT ACCESS WINDOW
*
CREATING A TABLE IN DATASHEET VIEWClick the Create
tab on the RibbonIn the Tables group, click the Table
buttonAccept the default ID primary key field with the
AutoNumber data type, or rename the field and change its data
type, if necessaryDouble-click the Add New Field column
heading, and then type the name for the field you are adding to
the tablePress the Tab key or the Enter key
*
CREATING A TABLE IN DATASHEET VIEWAdd all the
fields to your table by typing the field names in the column
headings and pressing the Tab key or the Enter key to move to
the next columnIn the first row below the field names, enter the
value for each field in the first record, pressing the Tab key or
the Enter key to move from field to fieldAfter entering the value
for the last field in the first record, press the Tab key or the
Enter key to move to the next row, and then enter the values for
the next record. Continue this process until you have entered all
the records for the tableClick the Save button on the Quick
Access Toolbar, enter a name for the table, and then click the
OK button
*
CREATING A TABLE IN DATASHEET VIEW
*
ENTERING RECORDS
*
SAVING A TABLEClick the Save button on the Quick Access
Toolbar. The Save As dialog box opensIn the Table Name text
box, type the name for the tableClick the OK button
*
OPENING A DATABASEStart Access and display the Getting
Started with Microsoft Office Access pageClick the More option
to display the Open dialog boxNavigate to the database file you
want to open, and then click the fileClick the Open button
*
OPENING A DATABASE
*
NAVIGATING A DATASHEETThe navigation buttons provide
another way to move vertically through the records
*
CREATING A SIMPLE QUERYA query is a question you ask
about the data stored in a databaseThe Simple Query Wizard
allows you to select records and fields quickly
*
CREATING A SIMPLE QUERY
*
CREATING A SIMPLE FORMA form is an object you use to
enter, edit, and view records in a databaseYou can design your
own forms, use the Form Wizard, or use the Form tool to create
a simple form with one mouse click
*
CREATING A SIMPLE FORM
*
CREATING A SIMPLE REPORTA report is a formatted
printout (or screen display) of the contents of one or more
tables in a databaseThe Report tool places all the fields from a
selected table (or query) on a report, making it the quickest way
to create a report
*
CREATING A SIMPLE REPORT
*
CREATING A SIMPLE REPORT
*
CREATING A SIMPLE REPORT
*
PRINTING A REPORTOpen the report in any view, or select
the report in the Navigation PaneTo print the report with the
default print settings, click the Office Button, point to Print,
and then click Quick Print
orTo display the Print dialog box and select the options you
want for printing the report, click the Office Button, point to
Print, and then click Print (or, if the report is displayed in Print
Preview, click the Print button in the Print group on the Print
Preview tab)
*
VIEWING OBJECTS IN THE NAVIGATION PANE
*
PENN STATE ERIE, The Behrend College Sam and Irene
Black School of Business
MIS204 Dr. Kathleen Noce
5/5/2012 2:58 PM 1MIS 204Microsoft Access – Skill
SheetSkills:1. Start Microsoft Access2. Create a new
database.3. Save your database to a folder on your P: drive.4.
Work with Tables.5. Work with Queries.6. Work with Forms7.
Work with Reports.There is a basic sequence of steps with
Access that you need to follow in order to successfully create a
database. If you try to perform these steps out of sequence,
you will encounter enough difficulties to jeopardize your
overall success. The steps are:· Create your database. You
only have to do this once, after that, you can open your existing
database and make the necessary changes to it. · Create each
table in the database. First you create the table, and then you
create the fields (columns) that to in the table. You have to
repeat this step for each table in your database. As you add
each field, you must define any special field attributes, such as
numeric, alpha-numeric, primary keys, field edits, table
relationships, etc.· Load the data into your table. There are a
variety of ways to do this. You can key it into the table, you
can import it in from an Excel spreadsheet, or use a specially
designed form that you designed to enter the data. · Create your
queries. These queries will help you select specific records
(rows) in your table, as well as update the data in your tables.
· Create your forms. Forms will provide a structured method to
enter and maintain data in your database. · Create your
reports. Reports allow you to select, sort, print, and perform
calculations on your data so you can display a report. Users
can look at your reports online or in a hard copy format.You
can, of course, go back to a database you have created and make
changes to your database. You can create additional forms and
queries as necessary. If however, you try to start by creating
your reports before you build the database, you will be dealing
with predictable but unfortunate results. The purpose of this
document is to give you basic information on each of the
different functions that you need to use to complete your
assignment. I’m hoping you will find it useful to help you find
a place to start when you need to perform a function within
Access. This document is not intended to be a fully
comprehensive Access manual. It does not cover every
function, option, or every way to perform a function in Access.I
provide step-by-step instructions on how to perform each
function required for our Access assignment. If you find
something that is missing or unclear please notify me so I can
address it. Unless I state otherwise, these notes assume that:·
You are logged on to a computer that has Microsoft Access
2007 installed.· You have Microsoft Access 2007 running on the
computer.· You have your database file opened to the Database
window.
Start Microsoft AccessBefore you can work in Microsoft Access
2007, you have to successfully log on to a computer with
Access 2007 installed on it. If you are on a PSU computer, you
have to log on and connect to the PSU network. You have to
know your PSU user ID and password. · Sign on to the
computer you are using.· Start – Programs – Database Programs
– Microsoft Access.To create a new database, · Click on the
Blank Database icon and click OK. · Type the name of the
database in the File Name field in the lower right hand corner of
the screen.· Click on the folder icon to the right of the File
Name field to select the path (drive letter and folder) where you
want to save the data base. This should be a folder on your P:
drive.· Click Create.If want to open an existing database click
on the Office button – Open and navigate to the database you
want to open. It may also be possible to open the database from
the list of recently used databases on the right hand side of the
window.Saving Your DatabaseWhen you are working on a PSU
computer, make sure you save your work to your personal
network share (P: drive) on the PSU network. Make sure you
write down the path to the database so you can find it again.
The database is a file that contains all the related information.
To the operating system, the database looks like one file with
the file extension of .accdb. All of the tables, queries, reports,
etc. you create in the database, are all stored inside this one
database file.You should periodically save your database as you
are working on it. The easiest way to do that is to click on the
save icon at the top of the window next to the Office button.
Once you have created your database and given it a name
Access will save your database automatically when you close it.
Working with TablesA table is a logical organization of related
information in your database. You can and will have multiple
tables in your database. While there is no specific number of
tables a database should have, you should utilize your superior
judgment skills when you design a database. It generally
makes sense to group a set of related fields into one table. The
rule of thumb is that you never want to have the same
information in more than one table, except for common fields.
If you have more than one table, you have to join them together
in order to use information from each table in one query or
report. In order to join one or more tables together, you need a
common field in each table so Access can match them together
based on their value.We have 3 tables in our project. The artist
table contains information related to individual artist such as
name, phone number, and web site. There is one record (row)
for each artist in the artist table. The product table contains
information about each of the products (CD’s) we sell. There
is one record (row) for each product. The reason we have two
tables is that we don’t want to repeat information, such as the
artist name in each product record. What we do instead is enter
the artist code in each product record, and then find a matching
artist record by matching the value of the artist code in each
product record, and obtaining the artist name from the
appropriate artist record.Create a Table· Click on the Create
tab· Click on the Table icon in the upper left hand corner· Click
on the down arrow below the View icon· Select Design View·
When the Save As window appears, enter the name of your table
in the Table Name fieldAccess will display a window for you to
enter the fields in the table. Once you create a table in Access,
it will be listed in the All Tables column on the left hand side of
the screen. You can switch from table to table by clicking on
the table name in this column. Add/Change Fields in the
TableFields (columns) are the smallest unit of information in
the table and database. Even though fields are made up of a
varying number of bytes, it is impossible to directly access the
individual bytes within Access, only the fields. You need to
define a separate field for each piece of information you want to
store and individually access. For example, in our database,
we have separate fields for artist name and web site. This is
because we might want to sort on the artist name, or we might
only want to print the web site. There are basically two data
types, text and numeric. Text data includes both alpha and
numeric characters. Whenever you work with text data, you
have to enclose it in quotes. For example, if you are looking
for all the artists with a music style of jazz, you type it as
“Jazz”. Numeric data contains only numbers, and a few
selected special characters. You don’t enclose numeric values
in quotes. If you are looking for all the product records with
unit costs greater than $7, you type it as >7. You can only
perform arithmetic computations of fields defined as a numeric
data type. Numeric data types include number and currency. If
you try to use a text field in a numeric computation, it won’t
work. To create a new field in your table:· Make sure you are
in design mode.· Go to the bottom of the fields displayed to add
a new field on the next line (first non-blank).· Type the field
name and select the data type. · If you select a data type of
text, the field size will appear as an option in field properties
section with a default size of 255. Highlight the field size and
type in the correct field size. · If you select a numeric data
type, such as number or currency, the field size will default.
You can change the field size in the field properties window. ·
Press Enter. · Repeat this step for each field you have to
add.To change an existing field in your table:· Click on Tables
in the Objects column in the left hand side of the window.·
Click on the icon of the table you want to change.· Click on
Design.· Highlight the field you want to change and make your
changes. Primary KeyThe primary key is data that Access uses
to find specific records in your table. For example, in each
record of our user table, we have a field called user ID. The
user ID must be unique (different) for each record. When you
want Access to find that specific record, you must provide the
user ID. To make a field the primary key: · Right click in the
column to the left of user ID.· Select Primary Key.In this
assignment, we don’t want to define a primary key for the Sales
table, because whenever we read the file, we read the entire file,
not just one record. Additionally, if we sell the same CD
multiple times on the same date (this is what we want to
happen) we will have multiple Sales records with the same
product code, sales date and sales price. If we have multiple
records with the same primary key, Access will not let us store
them. Therefore, we don’t want to define a primary key for
the Sales table. Field Properties
When you are working with fields in the design view Access
will display the Field Properties window directly below the
field definition window. The exact content of this window will
vary with the different field types. You will use the fields in
this window to define the specific attributes of the field such as
size, whether or not it is required, etc. Field SizeEnter the
length of the field. Input MaskEnter an input mask to define a
pattern for the data to be entered into this field. For example, a
telephone number would be defined as 000-000-0000, a social
security number 000-00-0000. You can skip this if you don’t
need it.CaptionEnter a label to be used for the field when it is
used on a form. If you skip this, the field name will be
used.Default ValueA default value is a value for a field that
always defaults into the field when the record is created. For
example, you may want the word “Jazz” to default into the style
field because so many of the artists perform jazz, and you won’t
have to type it each time. You will only have to go back and
change the word from Jazz to another valid value for style.To
set default value:· In the default line for the field, type the
default value. If the data type is text, you have to enclose it in
quotes.Validation RuleYou will want to add validation rules
(commonly called edits) for certain fields in your database.
This is important because it prevents users from entering
information in the field that doesn’t make any sense. If you
have five valid values for style, then you only want the users to
enter one of the five valid values into the product table. To
add validation rules:· Type the values that are acceptable, for
example “Jazz” or “Folk” or “Pop” in the validation rule field.
Be sure to enter the word or between each acceptable value.
Access will add the double quotes around each field for you.
Validation TextIf you enter a validation rule, you have an
obligation to enter a corresponding message that you want
Access to display the data entered doesn’t match the validation
rules. There is nothing more frustrating for users than to have a
computer system reject what they are entering, and not tell them
why. Make sure your validation text makes sense to you, and
to the users of the database. To add validation text,· In the
validation text field, type the message you want displayed, for
example “Invalid Style”, when the data doesn’t meet the
validation rules (pass the edits). The more detail you provide
the user, the better.RequiredEnter Yes if the field is required,
No if it is optional.Allow Zero LengthEnter Yes if you want to
allow zero length entries in this field, No if you
don’t.IndexedEnter Yes if this is a key field, No it it isn’t. If
you enter Yes the value of this field must be unique across the
entire data base. Unicode CompressionEnter No.IME
ModeSelect No Control.IME Sentence ModeSelect None.Smart
TagsLeave blank.AlignmentSelect the appropriate alignment for
the field. If you’re not sure, select General. Saving your
TableWhen you are done adding and changing the fields, close
the table window and save your changes.To close the window
and save your changes:· Click on the X in the upper right hand
corner of the table window to close the table.· Click on Yes to
save your changes to the table.· In the Save As field type the
table name in the format specified in the assignment, for
example, Artist and click on OK. This will save your table.You
can also click the Save icon in the upper left hand corner of
your screen at any time to save your database.Add/Change Data
in the TableAfter you have your tables designed, you need to
load your data into them. It is possible to design a form for this
purpose, but initially you can load the data directly into the
database in the datasheet view. This permits you to quickly
load a lot of data so you can get your database up and running
as soon as possible. To add or change the data in the table: ·
Click on Tables in the All Tables column on the left hand side
of your screen. · Double-click on the table you want to
maintain.To add data:· In the first row without data, type the
appropriate information in each field. · Press Tab to advance to
the next field.· When you get to the end of the row, press
Enter.· The cursor will advance to the next row after you finish
entering a row of data. · Repeat this process for each row of
data you want to load.
To change data:· Select the record you want to change.· Tab to
the field you want to change.· Highlight the data you want to
change.· Make your changes.· Press Enter.When you finish
adding or changing the data in the table,· Click on the X in the
upper right hand corner of the table window to close the table.
Importing Data into a table from Excel
There are many cases where it may be more convenient to
import data from an Excel spreadsheet then it is to key the data
into the datasheet in your database. You have to meet a couple
conditions before you can import data from Excel:
· The data must be set up in Excel exactly the way it has to go
into an Access datasheet.
· You must have column headings on the first row of the Excel
spreadsheet that match the field names in your table.
To import data into your database:
· Close the table you want to import data into.
· Click External Data – Excel Spreadsheet
· In the Get External Data – Excel Spreadsheet window:
· Click the Browse button and navigate to the folder where the
Excel file is located
· Select the file and click Open
· Select Append a copy of the records to the table
· Select the Table you want to copy the records into from the
drop down box
· Click OK.
When the Import Spreadsheet Wizard opens:
· Select the worksheet (usually worksheet 1) that contains the
data you want to import and click Next
· Confirm that the first row of data contains the correct column
headings and click Next
· Confirm that the table you want to import into is displayed in
the box and click Finish.
· If the warning window shown above appears, click Yes to
proceed anyway.
· Click close. Do not check Save import steps.
· Open the table to confirm that the data has been copied into
the fields correctly.
Joining TablesJoining tables is pretty much a non-event in
queries. When you add more than one table to a query, it
automatically creates a relationship between the two common
fields in the two records. A “join line” between the two tables
graphically illustrates this relationship. In the above
illustration, you can see that the Artist and Product table are
joined together because there is a line between the Artist Code
in the Artist Table and the Artist Code in the Product Table.
Artist Code is the common field that both tables contain.
Since the line is bold and you see the 1 and infinity symbols,
you can tell that there is a one to many relationship between the
Artist and Product table (1 artist can have many products).
You can also see that the Product Table is linked to the Sales
Table because there is a line from the Product Code in the
Product Table and the Product Code in the Sales Table.
If you don’t see a line between the common fields in each table,
then the tables are not joined. Your queries will most likely
run, but they will not yield the correct results. You can
correct this problem by simply pointing to the common field in
one of the tables, holding down the left mouse button and
dragging to the same field in the other table. Access will add
the line, and the tables will be joined together.
Referential Integrity and Table Relationships
There are times when you want to establish a permanent
relationship between two tables in your database instead of
simply establishing a relationship for the purpose of a query.
One reason to do this is to establish a referential integrity check
between two tables. Referential integrity edits the value of the
fields the tables are joined to make sure they are valid. Let’s
say that you have a referential integrity relationship established
between the Artist and Product table based on artist code.
When you create a new product record, and you enter an artist
code of LC01, it checks to make sure there is an artist code of
LC01 in the Artist table.
To establish a relationship:
· Database Tools – Relationships.
· When the Show Table window appears, add each of the tables
you want to establish a relationship for.
· While holding your left mouse button down, drag the cursor
from the field in one table to the matching field in the other
table.
· The Edit Relationships table will display.
· Select Referential Integrity.
· Click Create.
To edit the relationship:
· Right click on the middle line between the two tables and
select Edit Relationships.
· Make your selection from the Edit Relationships window.
· Click OK.
When you finish creating or editing the relationship,
· Click on the X in the upper right hand corner of the table
window to close the table.
Working With Queries
Queries add a great deal of functionality to Access. You can
use a query to view, change, and analyze data in a variety of
ways. You can use the Query Wizard to help you create a
query. This is sometimes the easiest approach, but it also
limits your flexibility. Additionally, you can use the design
query function to design a query from scratch. Select
QueriesThe most common form of query is a select query, where
you use the query capability of Access to select certain records
from your database. You can print the records you selected, or
you can use the query as a source of records for other forms,
reports, and data access pages. To create a new select query,·
Create – Query Design· In the Show Table window, click on the
Tables you want in your query and click Add. Repeat this for
every table you want to include in your query.· After you select
all the tables you want in the query, click Close.· In the first
column, click on Field Name. Use the down arrow to select the
field you want.· Repeat this for each column (field) you want to
include in your query.· In the sort row, select the fields you
want to sort on, and use the right down arrow to select whether
you want to sort in ascending or descending sequence.· If you
do not want to show the field in your output, unclick the show
row for that field.· If you only want to select certain records,
use the criteria field to enter your selection criteria. If you are
selecting text data, enter the value you are searching for.You
can also change your existing queries. After you open the query
in the design view, the commands are the same.To change a
select query,· Create – Query Design· In the Show Table
window, click on the Queries tab you want in your query and
click Add.· Make the appropriate changes.· Click on the X in
the upper right hand corner of the query window to close the
window.· Click on Yes to save your changes.You can create
queries to select certain records based on what you need to see.
For example, you can select only the records where a field in
the table has a certain value.To select certain records, · Enter a
formula in the criteria row for the field. For example, >7 will
limit the report to records with unit costs greater than $7.· If
you want to select records that have a certain text value, such as
a certain set of codes, you can enter the code you are looking
for in the criteria field. For example, if you enter Jazz, Access
will return all the records that have Jazz in the field you are
matching against. A couple things to watch out for here … you
don’t have to enter the quotes around the text, but Access will
automatically put the quotes around the text. You do have to
enter the correct operator. This can be confusing, and if you
don’t think about it, it will cause you to select the wrong
records. Let’s say you are looking for all the records with Jazz
or Folk. You might think it is logical to type Jazz and Folk in
your criteria, but it won’t work. Whenever you include the
word “and”, Access assumes that both conditions must be true
before it selects the record. Since each record only contains
one of the codes, there will never be a time when both
conditions are true. The proper selection criteria are Jazz or
Folk, so Access will select the records that contain either one of
these values.Unique Values OptionThe unique values option
allows you to print the values of certain fields in your table
only once. For example, suppose you have 20 records that
contain 5 different style codes and you want to find out which
style codes are used. Setting the unique values option will tell
Access to only select one record for each value. To set the
unique values option, · Right click on the Criteria field in the
design area.· Select Properties from the pop up window.· Click
on Unique Values and select Yes from the criteria line on the
right hand side of the screen.· Click the X in the upper right
hand corner of the Query Properties window to close the
window and save your change.· Note: You can only print the
one field from the table. Calculating a Value with Field
FormulasYou can create queries that calculate values for new
fields. You can create a new field that contains the total of the
two other fields.To calculate a new field:· Go to a new column,
for a new field.· Right click on the field row.· Select Build …
to start the Expression Builder.· In the Expression Builder
window:· Select the table(s) that contains the fields you want to
work with.· Select the first field from the list of fields and click
on paste.· Click on the appropriate operation sign.· Select the
second field from the list of fields and click on paste.· Click
OK.· Change the word Expr1 to whatever you want to call the
total, for example Total or Profit.Update QueriesYou can use an
update query to change the value of different fields in your
database.To create an Update Query:· Create – Query Design·
Add the table you want to update to the query.· Click on the
Update button in the toolbar.· For the field you want to change,
type the value you want in the field in the Update To line.· To
execute the update, press the Run (red exclamation point) icon,
4 icons to the left of the Update icon.
Delete QueriesYou can use the delete query function to delete
records in your database based on the value of certain fields in
your database. It is a really nice powerful feature, but it can
also make a mess of things if you make a mistake and end up
deleting the wrong records. Use this feature carefully.To
make a query a Delete Query:· Create – Query Design· Add the
table you want to delete records from to the query.· Click on the
Delete button in the toolbar.· In the column of the field you
want to base your deletion on, go to the delete row and choose
where or from. Where means that you want to delete any record
where the value of this field is equal to the deletion criteria.
From means that you want to delete any record where the value
of this field is greater than or equal to the value in the criteria
field. · Type the value of the field you want to match against in
the Criteria field.· To execute the deletion, press the Run (red
exclamation point) icon, 6 icons to the left of the Delete
icon.Total QueriesYou can use total queries to see totals of
different groups of data. To make a query a Total Query:·
Create – Query Design· Add the table(s) that contains the fields
you want to total.· Click on the Totals icon at the right hand
side of the ribbon. The words “Group By” will appear in each
row in the Total column.· In each numeric column, use the
down arrow to change the word “Group By” to some other word,
such as “sum” or “average”, depending on the operation you
want to perform.· For each column you want to group by, leave
the words “Group By” in place. · In all the other columns,
delete the words from the total row.· Close the query and open
it again in the datasheet view.Working with FormsA form
permits you to add, change, or display one record at a time. It
is less confusing for users to deal with one record at a time, and
to only see the record they are dealing with. Access provides a
form wizard to help you quickly create forms. Of course, you
can bypass the forms wizard and create the form yourself.
To create a form for a table:
· Select the table you want to maintain with the form from the
All Tables column.
· Create – Form
· Select the Form View to see the form.
· Select the Layout View to see the layout of the form.
· Select the Design View to maintain the design of the form. ·
Click on the X in the upper right hand corner of the table
window to close the form.· When the window displays, enter the
name of the form and click OK.
Although it is not required for this class, you can go into the
design window and manually change the layout of your form.
You have a lot of freedom when you do this because you can
change almost anything, but it can also be very frustrating
because you don’t always end up with things looking the way
you want them to.To change an existing form: · Select the form
you want to change from the All Tables column, · Design –
View – Design View· Make the appropriate changes to the
form.When you are finished creating or changing your form,
make sure you save it.To save the changes to your form:· Click
on the X in the upper right hand corner of the form window to
close the window· Click on Yes to save your changes. One of
the things that is different about a form is that you only see one
record at a time. You can use the arrows at the bottom of the
screen to advance forward and backward through the records in
the table. If you want to go to the end of the table to enter a
new record, press the star key. If you want to jump to a specific
record, enter the record number you are looking for.
Working with ReportsAfter you have your database up and
running and data loaded into it, you may want to create a report.
If you are designing a data base from scratch, it is a good idea
to think about what you want to print on the reports so you
make sure you have the data you need in the data base.
Otherwise, you end up utilizing some of your Access skills to
make design changes which can be cumbersome and time
consuming. To create a new report:· Create – Reports – Report
Wizard· In the Report Wizard window, · Click on the down
arrow in the Tables/Queries field to select your table.·
Highlight the field you want on the form and click on >, or click
on >> to select all fields. · Click on Next.· Select any report
groupings that you want. Groupings are really neat. They
provide a way for you to group the records in your report in a
logical sequence. For example, you may want to group all the
records for a specific department together. · Click on Next.·
Select the order you want the report sorted in. In the first
field, select the most important field from your database, in the
second field; select the second most important field in your
database.· Click on Next.· Select the report layout and
orientation that you want.· Click on Next.· Select the report
style that you want.· Click on Next.· Type the title of the
report, for example, High Cost.· Click on Finish.· Access will
display a copy of the report, at least the first page of it. You
will probably need to modify the report to make it look right.To
modify the report layout:· Right click on the Report from the
All Tables column on the left hand column and choose Design
view.· Make the appropriate changes.After you finish adding or
changing your report, save your changes.To close the window
and save your reports:· Click on the X in the upper right hand
corner of the report window to close the window.· Click on Yes
to save your changes.
Access Assignment #2 (25 Points)
Note: Access Assignment #1 must be completed first before
beginning Assignment #2.
Problem/Objectives of the Assignment:
The employees who staff the gift shop have determined a
number of questions they want the database management system
to answer. You must obtain answers to the questions posed by
the volunteers using Microsoft Access: Create a series of
queries to answer questions associated with the BoarDome
Database.
Instructions: Perform the following tasks after you open the
database you created for Assignment One:
Create a query for the Product Id, Description and Selling Price
for all the records in the Product Table sorted by Product Id.
Label ProductId Query.
Create Only a query for the Product Id, Description and Selling
Price for all products with the Vendor Code of MS. Label as
MS Query.
Create a query for the Product Id, Description, and Vendor Code
for all products that cost more than $20. List the records in
descending order by Cost. Label as Cost Query.
Create a query for the Product Id and Description for all
products that have a Selling Price of $5 or less. Label as Selling
Price Query.
Create a query for all fields for those products that cost more
than $10 and where the number of units on hand is less than 10.
Label as Low Inventory Query.
Create a query for all fields for those products that have a
Vendor Code of WW or have a Selling Price less than $10.
Label as WW-Vendor Code Query.
Join the Product Table and the Vendor Table. Create a query
for the Product Id, Description, Cost, Name and Telephone
Number fields. Label the query as Product and Vendor Query.
Restrict the records retrieved in Task 7 to only those products
where the number of units on hand is less than 10 (Also show
the Number of Units on Hand). Label the query as Inventory
Less than 10Query.
Create a query for the Average Cost and Average Selling Price
for all products. (Just two fields should be displayed). Label as
Average Query.
Select Product Id, Description, On Hand and Cost. Compute
the On Hand Value (On hand*cost) for all records in the table.
Label asOn Hand Query. HINT: (Enter your formula in the
blank field to the right of Cost).
Create and save the following validation rules for the Product
Table in Design view.
a. Make the Description field a required field.
b. Ensure that any lowercase letters entered in the Product Id
field are converted to uppercase.
c. Specify that the on hand units must be between 0 and 100.
Include validation text.
SSave the changes.
Open the Product Form you created in Assignment #1, and add
the following record to the Product table.
MN04 board game 4 $17.50
$21.94 WW
Access Assignment #1
(BoarDome Database)
(25 Points)
Problem: BoarDome is in the business of producing skate,
surf and snow boards. They run a small museum and gift shop,
located in airports in cities where the extreme sports are big.
The gift shop purchases products from vendors for products and
merchandise with the company name on them. The director of
the gift shop has asked you to create and update a database that
employees can use. The database consists of two tables; The
Product table contains information on items available for sale.
The Vendor table contains information on the vendors.
Objectives of the Assignment:
Using Microsoft Access:
1. Create a new database in which to store all the objects
related to the gift shop system data.
2. Create tables and an input form
3. Populate the tables using data supplied
4. Perform file maintenance to tables
5. Generate a report utilizing the data
Instructions: Perform the following tasks.
1. Create a new database called BoarDome Gift shop
Database.
2. Create a Product Table using the structure shown below.
Use the nameProductfor the table name and save it with a File
name = Product – Your Name.
Field Name
Data Type
Field Size
Description
Product Id
Text
4
User Id Number, Primary key, Yes (No Duplicates)
Description
Text
25
Description of the Product
On Hand
Number
Long Integer
Number of Units On Hand
Cost
Currency
Cost of Product
Selling Price
Currency
Selling Price of Product
Vendor Code
Text
2
Code of Product Vendor, Yes (Duplicates OK)
3. Add the data shown below to the Product Table.
Product Id
Description
On Hand
Cost
Selling Price
Vendor Code
CH04
hoodies
11
$26.75
$28.90
WW
DI24
lanyards
14
$3.75
$4.95
MS
GL18
hats
2
$27.50
$29.95
MS
JG01
glasses
3
$5.40
$6.95
MS
PC03
mugs
5
$8.50
$10.95
WW
ST23
Stationery
8
$3.95
$5.00
AR
TD05
t-shirts
6
$13.75
$15.95
WW
WI10
shorts
10
$7.50
$9.95
MS
WL34
Can holders
15
$2.50
$2.95
AR
YO12
stickers
9
$1.60
$1.95
WW
4. Create a Vendor Table using the structure shown below.
Use the nameVendorfor the table and save it with a File name
= Vendor – Your Name.
Field Name
Data Type
Field Size
Description
Vendor Code
Text
2
Vendor Code (Primary Key), Yes (No Duplicates)
Name
Text
20
Name of Vendor
Address
Text
15
Street Address
City
Text
15
City
State
Text
2
State (Two-Character Version)
Zip Code
Text
5
Zip Code (Five-Character Version)
Telephone Number
Text
20
Telephone Number (999-999-9999 Version
Note: Use the Phone NumberInputMask format
5. Add the data shown below to the Vendor Table.
Vendor Code
Name
Address
City
State
Zip Code
Telephone Number
AR
Artisan's printer
3540 Grand
Hancock
WI
69780
414-555-7865
MS
Tshirts 4less
134 Union
Delana
SD
41345
605-555-3498
WW
glassworks
655 Clive
Great Falls
WV
34567
304-555-4532
6. Create a form for the Product Table. Use AutoForm
Wizard to create your form. Save the form as “Product – Your
Name”.
7. Use the form you created to add the following two new
products to the Product Table.
Product Id
Description
On Hand
Cost
Selling Price
Vendor Code
CH08
Key Chains
12
$20.00
$25.00
AR
PS30
Posters
20
$3.50
$4.50
MS
8. Create a report. Report should contain the following
elements: Product ID,Description, On Hand, and Cost.
· Use Report Wizard to create the report
· Sort Order for your records = On Hand (Descending
Order)
· Layout = Tabular; Orientation = Portrait; Style =
Concourse or any other style
· Title = Inventory Report - Your Name.
Output Requirements:
· Save to your folder on the your pdrive or hard drive:
1. Created database entitled, BoarDome Gift shop Database
One.
2. Two created tables entitled, Product and Vendor
3. One created form entitled, Product
4. One created Report entitled, Inventory Report.
INTRODUCTION TO ACCESSOBJECTIVESDefine th.docx

Más contenido relacionado

Similar a INTRODUCTION TO ACCESSOBJECTIVESDefine th.docx

access1.ppt
access1.pptaccess1.ppt
access1.pptmayada34
 
Access Basics 01
Access Basics 01Access Basics 01
Access Basics 01Lets try
 
Database as information system
Database as information systemDatabase as information system
Database as information systemKAZEMBETVOnline
 
Acccesss notes
Acccesss notesAcccesss notes
Acccesss notesart02
 
Microsoft access 2007 tutorial
Microsoft access 2007 tutorialMicrosoft access 2007 tutorial
Microsoft access 2007 tutorialGhazali_MFP
 
Mic office access tutorial for beginners
Mic office access tutorial for beginnersMic office access tutorial for beginners
Mic office access tutorial for beginnersAimina Salsabila
 
Pks ms access unit 4_bcomcs
Pks ms access unit 4_bcomcsPks ms access unit 4_bcomcs
Pks ms access unit 4_bcomcsKALAISELVI P
 
Microsoft access
Microsoft accessMicrosoft access
Microsoft accessReshmiSV
 
Microsoft Office Access 2003 Tutorial for Beginners
Microsoft Office Access 2003 Tutorial for BeginnersMicrosoft Office Access 2003 Tutorial for Beginners
Microsoft Office Access 2003 Tutorial for BeginnersAimina Salsabila
 
Introduction to Microsoft Access2.ppt
Introduction to Microsoft Access2.pptIntroduction to Microsoft Access2.ppt
Introduction to Microsoft Access2.pptJoshCasas1
 
Access2003
Access2003Access2003
Access2003mrh1222
 
Access2003
Access2003Access2003
Access2003tanik363
 
Access2007 part1
Access2007 part1Access2007 part1
Access2007 part1jigeno
 
Access Assignments Complete List1. Acc 2 Bank Database2. Acc.docx
Access Assignments Complete List1. Acc 2 Bank Database2. Acc.docxAccess Assignments Complete List1. Acc 2 Bank Database2. Acc.docx
Access Assignments Complete List1. Acc 2 Bank Database2. Acc.docxannetnash8266
 

Similar a INTRODUCTION TO ACCESSOBJECTIVESDefine th.docx (20)

Access tutorial2
Access tutorial2Access tutorial2
Access tutorial2
 
access1.ppt
access1.pptaccess1.ppt
access1.ppt
 
Access Basics 01
Access Basics 01Access Basics 01
Access Basics 01
 
Database as information system
Database as information systemDatabase as information system
Database as information system
 
Acccesss notes
Acccesss notesAcccesss notes
Acccesss notes
 
Microsoft access 2007 tutorial
Microsoft access 2007 tutorialMicrosoft access 2007 tutorial
Microsoft access 2007 tutorial
 
Mic office access tutorial for beginners
Mic office access tutorial for beginnersMic office access tutorial for beginners
Mic office access tutorial for beginners
 
M s access
M s accessM s access
M s access
 
Pks ms access unit 4_bcomcs
Pks ms access unit 4_bcomcsPks ms access unit 4_bcomcs
Pks ms access unit 4_bcomcs
 
Microsoft access
Microsoft accessMicrosoft access
Microsoft access
 
Microsoft Office Access 2003 Tutorial for Beginners
Microsoft Office Access 2003 Tutorial for BeginnersMicrosoft Office Access 2003 Tutorial for Beginners
Microsoft Office Access 2003 Tutorial for Beginners
 
001.general
001.general001.general
001.general
 
Introduction to Microsoft Access2.ppt
Introduction to Microsoft Access2.pptIntroduction to Microsoft Access2.ppt
Introduction to Microsoft Access2.ppt
 
MS Access Training
MS Access TrainingMS Access Training
MS Access Training
 
Access2003
Access2003Access2003
Access2003
 
Access2003
Access2003Access2003
Access2003
 
Access2007 part1
Access2007 part1Access2007 part1
Access2007 part1
 
Access Assignments Complete List1. Acc 2 Bank Database2. Acc.docx
Access Assignments Complete List1. Acc 2 Bank Database2. Acc.docxAccess Assignments Complete List1. Acc 2 Bank Database2. Acc.docx
Access Assignments Complete List1. Acc 2 Bank Database2. Acc.docx
 
MS ACCESS PPT.pptx
MS ACCESS PPT.pptxMS ACCESS PPT.pptx
MS ACCESS PPT.pptx
 
Introduction to Microsoft Access2.ppt
Introduction to Microsoft Access2.pptIntroduction to Microsoft Access2.ppt
Introduction to Microsoft Access2.ppt
 

Más de mariuse18nolet

IRM 3305 Risk Management Theory and PracticeFall 2014Proje.docx
IRM 3305 Risk Management Theory and PracticeFall 2014Proje.docxIRM 3305 Risk Management Theory and PracticeFall 2014Proje.docx
IRM 3305 Risk Management Theory and PracticeFall 2014Proje.docxmariuse18nolet
 
Ironwood Company manufactures cast-iron barbeque cookware. During .docx
Ironwood Company manufactures cast-iron barbeque cookware. During .docxIronwood Company manufactures cast-iron barbeque cookware. During .docx
Ironwood Company manufactures cast-iron barbeque cookware. During .docxmariuse18nolet
 
IRM 3305 Risk Management Theory and PracticeGroup Project.docx
IRM 3305 Risk Management Theory and PracticeGroup Project.docxIRM 3305 Risk Management Theory and PracticeGroup Project.docx
IRM 3305 Risk Management Theory and PracticeGroup Project.docxmariuse18nolet
 
Iranian Women and GenderRelations in Los AngelesNAYEREH .docx
Iranian Women and GenderRelations in Los AngelesNAYEREH .docxIranian Women and GenderRelations in Los AngelesNAYEREH .docx
Iranian Women and GenderRelations in Los AngelesNAYEREH .docxmariuse18nolet
 
IRB HANDBOOK IRB A-Z Handbook E.docx
IRB HANDBOOK IRB A-Z Handbook  E.docxIRB HANDBOOK IRB A-Z Handbook  E.docx
IRB HANDBOOK IRB A-Z Handbook E.docxmariuse18nolet
 
IQuiz # II-Emerson QuizGeneral For Emerson, truth (or.docx
IQuiz # II-Emerson QuizGeneral For Emerson, truth (or.docxIQuiz # II-Emerson QuizGeneral For Emerson, truth (or.docx
IQuiz # II-Emerson QuizGeneral For Emerson, truth (or.docxmariuse18nolet
 
iPython 2For Beginners OnlyVersion 1.0Matthew .docx
iPython 2For Beginners OnlyVersion 1.0Matthew .docxiPython 2For Beginners OnlyVersion 1.0Matthew .docx
iPython 2For Beginners OnlyVersion 1.0Matthew .docxmariuse18nolet
 
Iranian Journal of Military Medicine Spring 2011, Volume 13, .docx
Iranian Journal of Military Medicine  Spring 2011, Volume 13, .docxIranian Journal of Military Medicine  Spring 2011, Volume 13, .docx
Iranian Journal of Military Medicine Spring 2011, Volume 13, .docxmariuse18nolet
 
IoT Referenceshttpswww.techrepublic.comarticlehow-to-secur.docx
IoT Referenceshttpswww.techrepublic.comarticlehow-to-secur.docxIoT Referenceshttpswww.techrepublic.comarticlehow-to-secur.docx
IoT Referenceshttpswww.techrepublic.comarticlehow-to-secur.docxmariuse18nolet
 
IP Subnet Design Project- ONLY QUALITY ASSIGNMENTS AND 0 PLAG.docx
IP Subnet Design Project- ONLY QUALITY ASSIGNMENTS AND 0 PLAG.docxIP Subnet Design Project- ONLY QUALITY ASSIGNMENTS AND 0 PLAG.docx
IP Subnet Design Project- ONLY QUALITY ASSIGNMENTS AND 0 PLAG.docxmariuse18nolet
 
IranAyatollahTheocracyTwelver ShiismVilayat-e Faghih (jur.docx
IranAyatollahTheocracyTwelver ShiismVilayat-e Faghih (jur.docxIranAyatollahTheocracyTwelver ShiismVilayat-e Faghih (jur.docx
IranAyatollahTheocracyTwelver ShiismVilayat-e Faghih (jur.docxmariuse18nolet
 
ipopulation monitoring in radiation emergencies a gui.docx
ipopulation monitoring in radiation emergencies a gui.docxipopulation monitoring in radiation emergencies a gui.docx
ipopulation monitoring in radiation emergencies a gui.docxmariuse18nolet
 
In Innovation as Usual How to Help Your People Bring Great Ideas .docx
In Innovation as Usual How to Help Your People Bring Great Ideas .docxIn Innovation as Usual How to Help Your People Bring Great Ideas .docx
In Innovation as Usual How to Help Your People Bring Great Ideas .docxmariuse18nolet
 
Investor’s Business Daily – Investors.comBloomberg Business – Blo.docx
Investor’s Business Daily –  Investors.comBloomberg Business – Blo.docxInvestor’s Business Daily –  Investors.comBloomberg Business – Blo.docx
Investor’s Business Daily – Investors.comBloomberg Business – Blo.docxmariuse18nolet
 
Invitation to Public Speaking, Fifth EditionChapter 8 Introdu.docx
Invitation to Public Speaking, Fifth EditionChapter 8 Introdu.docxInvitation to Public Speaking, Fifth EditionChapter 8 Introdu.docx
Invitation to Public Speaking, Fifth EditionChapter 8 Introdu.docxmariuse18nolet
 
Invitation to the Life SpanRead chapters 13 and 14.Objectives.docx
Invitation to the Life SpanRead chapters 13 and 14.Objectives.docxInvitation to the Life SpanRead chapters 13 and 14.Objectives.docx
Invitation to the Life SpanRead chapters 13 and 14.Objectives.docxmariuse18nolet
 
IOBOARD Week 2 Lab BPage 2 of 4Name _________________ Gr.docx
IOBOARD Week 2 Lab BPage 2 of 4Name _________________ Gr.docxIOBOARD Week 2 Lab BPage 2 of 4Name _________________ Gr.docx
IOBOARD Week 2 Lab BPage 2 of 4Name _________________ Gr.docxmariuse18nolet
 
INVITATION TO Computer Science 1 1 Chapter 17 Making .docx
INVITATION TO  Computer Science 1 1 Chapter 17 Making .docxINVITATION TO  Computer Science 1 1 Chapter 17 Making .docx
INVITATION TO Computer Science 1 1 Chapter 17 Making .docxmariuse18nolet
 
Investment Analysis & Portfolio Management AD 717 OLHomework E.docx
Investment Analysis & Portfolio Management AD 717 OLHomework E.docxInvestment Analysis & Portfolio Management AD 717 OLHomework E.docx
Investment Analysis & Portfolio Management AD 717 OLHomework E.docxmariuse18nolet
 
Investment BAFI 1042 Kevin Dorr 3195598 GOODMAN .docx
Investment BAFI 1042  Kevin Dorr 3195598  GOODMAN .docxInvestment BAFI 1042  Kevin Dorr 3195598  GOODMAN .docx
Investment BAFI 1042 Kevin Dorr 3195598 GOODMAN .docxmariuse18nolet
 

Más de mariuse18nolet (20)

IRM 3305 Risk Management Theory and PracticeFall 2014Proje.docx
IRM 3305 Risk Management Theory and PracticeFall 2014Proje.docxIRM 3305 Risk Management Theory and PracticeFall 2014Proje.docx
IRM 3305 Risk Management Theory and PracticeFall 2014Proje.docx
 
Ironwood Company manufactures cast-iron barbeque cookware. During .docx
Ironwood Company manufactures cast-iron barbeque cookware. During .docxIronwood Company manufactures cast-iron barbeque cookware. During .docx
Ironwood Company manufactures cast-iron barbeque cookware. During .docx
 
IRM 3305 Risk Management Theory and PracticeGroup Project.docx
IRM 3305 Risk Management Theory and PracticeGroup Project.docxIRM 3305 Risk Management Theory and PracticeGroup Project.docx
IRM 3305 Risk Management Theory and PracticeGroup Project.docx
 
Iranian Women and GenderRelations in Los AngelesNAYEREH .docx
Iranian Women and GenderRelations in Los AngelesNAYEREH .docxIranian Women and GenderRelations in Los AngelesNAYEREH .docx
Iranian Women and GenderRelations in Los AngelesNAYEREH .docx
 
IRB HANDBOOK IRB A-Z Handbook E.docx
IRB HANDBOOK IRB A-Z Handbook  E.docxIRB HANDBOOK IRB A-Z Handbook  E.docx
IRB HANDBOOK IRB A-Z Handbook E.docx
 
IQuiz # II-Emerson QuizGeneral For Emerson, truth (or.docx
IQuiz # II-Emerson QuizGeneral For Emerson, truth (or.docxIQuiz # II-Emerson QuizGeneral For Emerson, truth (or.docx
IQuiz # II-Emerson QuizGeneral For Emerson, truth (or.docx
 
iPython 2For Beginners OnlyVersion 1.0Matthew .docx
iPython 2For Beginners OnlyVersion 1.0Matthew .docxiPython 2For Beginners OnlyVersion 1.0Matthew .docx
iPython 2For Beginners OnlyVersion 1.0Matthew .docx
 
Iranian Journal of Military Medicine Spring 2011, Volume 13, .docx
Iranian Journal of Military Medicine  Spring 2011, Volume 13, .docxIranian Journal of Military Medicine  Spring 2011, Volume 13, .docx
Iranian Journal of Military Medicine Spring 2011, Volume 13, .docx
 
IoT Referenceshttpswww.techrepublic.comarticlehow-to-secur.docx
IoT Referenceshttpswww.techrepublic.comarticlehow-to-secur.docxIoT Referenceshttpswww.techrepublic.comarticlehow-to-secur.docx
IoT Referenceshttpswww.techrepublic.comarticlehow-to-secur.docx
 
IP Subnet Design Project- ONLY QUALITY ASSIGNMENTS AND 0 PLAG.docx
IP Subnet Design Project- ONLY QUALITY ASSIGNMENTS AND 0 PLAG.docxIP Subnet Design Project- ONLY QUALITY ASSIGNMENTS AND 0 PLAG.docx
IP Subnet Design Project- ONLY QUALITY ASSIGNMENTS AND 0 PLAG.docx
 
IranAyatollahTheocracyTwelver ShiismVilayat-e Faghih (jur.docx
IranAyatollahTheocracyTwelver ShiismVilayat-e Faghih (jur.docxIranAyatollahTheocracyTwelver ShiismVilayat-e Faghih (jur.docx
IranAyatollahTheocracyTwelver ShiismVilayat-e Faghih (jur.docx
 
ipopulation monitoring in radiation emergencies a gui.docx
ipopulation monitoring in radiation emergencies a gui.docxipopulation monitoring in radiation emergencies a gui.docx
ipopulation monitoring in radiation emergencies a gui.docx
 
In Innovation as Usual How to Help Your People Bring Great Ideas .docx
In Innovation as Usual How to Help Your People Bring Great Ideas .docxIn Innovation as Usual How to Help Your People Bring Great Ideas .docx
In Innovation as Usual How to Help Your People Bring Great Ideas .docx
 
Investor’s Business Daily – Investors.comBloomberg Business – Blo.docx
Investor’s Business Daily –  Investors.comBloomberg Business – Blo.docxInvestor’s Business Daily –  Investors.comBloomberg Business – Blo.docx
Investor’s Business Daily – Investors.comBloomberg Business – Blo.docx
 
Invitation to Public Speaking, Fifth EditionChapter 8 Introdu.docx
Invitation to Public Speaking, Fifth EditionChapter 8 Introdu.docxInvitation to Public Speaking, Fifth EditionChapter 8 Introdu.docx
Invitation to Public Speaking, Fifth EditionChapter 8 Introdu.docx
 
Invitation to the Life SpanRead chapters 13 and 14.Objectives.docx
Invitation to the Life SpanRead chapters 13 and 14.Objectives.docxInvitation to the Life SpanRead chapters 13 and 14.Objectives.docx
Invitation to the Life SpanRead chapters 13 and 14.Objectives.docx
 
IOBOARD Week 2 Lab BPage 2 of 4Name _________________ Gr.docx
IOBOARD Week 2 Lab BPage 2 of 4Name _________________ Gr.docxIOBOARD Week 2 Lab BPage 2 of 4Name _________________ Gr.docx
IOBOARD Week 2 Lab BPage 2 of 4Name _________________ Gr.docx
 
INVITATION TO Computer Science 1 1 Chapter 17 Making .docx
INVITATION TO  Computer Science 1 1 Chapter 17 Making .docxINVITATION TO  Computer Science 1 1 Chapter 17 Making .docx
INVITATION TO Computer Science 1 1 Chapter 17 Making .docx
 
Investment Analysis & Portfolio Management AD 717 OLHomework E.docx
Investment Analysis & Portfolio Management AD 717 OLHomework E.docxInvestment Analysis & Portfolio Management AD 717 OLHomework E.docx
Investment Analysis & Portfolio Management AD 717 OLHomework E.docx
 
Investment BAFI 1042 Kevin Dorr 3195598 GOODMAN .docx
Investment BAFI 1042  Kevin Dorr 3195598  GOODMAN .docxInvestment BAFI 1042  Kevin Dorr 3195598  GOODMAN .docx
Investment BAFI 1042 Kevin Dorr 3195598 GOODMAN .docx
 

Último

4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinojohnmickonozaleda
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptxSherlyMaeNeri
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPCeline George
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxAshokKarra1
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Seán Kennedy
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxPoojaSen20
 

Último (20)

4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
FILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipinoFILIPINO PSYCHology sikolohiyang pilipino
FILIPINO PSYCHology sikolohiyang pilipino
 
Judging the Relevance and worth of ideas part 2.pptx
Judging the Relevance  and worth of ideas part 2.pptxJudging the Relevance  and worth of ideas part 2.pptx
Judging the Relevance and worth of ideas part 2.pptx
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
What is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERPWhat is Model Inheritance in Odoo 17 ERP
What is Model Inheritance in Odoo 17 ERP
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Karra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptxKarra SKD Conference Presentation Revised.pptx
Karra SKD Conference Presentation Revised.pptx
 
Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...Student Profile Sample - We help schools to connect the data they have, with ...
Student Profile Sample - We help schools to connect the data they have, with ...
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptxFINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
FINALS_OF_LEFT_ON_C'N_EL_DORADO_2024.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptxCulture Uniformity or Diversity IN SOCIOLOGY.pptx
Culture Uniformity or Diversity IN SOCIOLOGY.pptx
 

INTRODUCTION TO ACCESSOBJECTIVESDefine th.docx

  • 1. INTRODUCTION TO ACCESS * OBJECTIVESDefine the terms field, record, table, relational database, primary key, and foreign keyCreate a blank databaseIdentify the components of the Microsoft Access windowCreate and save a table in Datasheet viewEnter field names and records in a table datasheetOpen a table using the Navigation Pane * OBJECTIVESOpen an Access databaseCopy and paste records from another Access databaseNavigate a table datasheetCreate and navigate a simple queryCreate and navigate a simple formCreate, preview, navigate, and print a simple reportLearn how to manage a database by compacting, backing up, and restoring a database * ORGANIZING DATAYour first step in organizing data is to identify the individual fieldsThe specific value, or content, of a
  • 2. field is called the field valueA set of field values is called a recordNext, you group related fields together into tables * DATABASES AND RELATIONSHIPSA collection of related tables is called a database, or a relational databaseYou connect the records in the separate tables through a common fieldA primary key is a field, or a collection of fields, whose values uniquely identify each record in a tableWhen you include the primary key from one table as a field in a second table to form a relationship between the two tables, it is called a foreign key in the second table * DATABASES AND RELATIONSHIPS * RELATIONAL DATABASE MANAGEMENT SYSTEMSA database management system (DBMS) is a software program that lets you create databases and then manipulate data in themIn a relational database management system, data is organized as a collection of tables * EXPLORING THE MICROSOFT ACCESS WINDOW *
  • 3. CREATING A TABLE IN DATASHEET VIEWClick the Create tab on the RibbonIn the Tables group, click the Table buttonAccept the default ID primary key field with the AutoNumber data type, or rename the field and change its data type, if necessaryDouble-click the Add New Field column heading, and then type the name for the field you are adding to the tablePress the Tab key or the Enter key * CREATING A TABLE IN DATASHEET VIEWAdd all the fields to your table by typing the field names in the column headings and pressing the Tab key or the Enter key to move to the next columnIn the first row below the field names, enter the value for each field in the first record, pressing the Tab key or the Enter key to move from field to fieldAfter entering the value for the last field in the first record, press the Tab key or the Enter key to move to the next row, and then enter the values for the next record. Continue this process until you have entered all the records for the tableClick the Save button on the Quick Access Toolbar, enter a name for the table, and then click the OK button * CREATING A TABLE IN DATASHEET VIEW * ENTERING RECORDS *
  • 4. SAVING A TABLEClick the Save button on the Quick Access Toolbar. The Save As dialog box opensIn the Table Name text box, type the name for the tableClick the OK button * OPENING A DATABASEStart Access and display the Getting Started with Microsoft Office Access pageClick the More option to display the Open dialog boxNavigate to the database file you want to open, and then click the fileClick the Open button * OPENING A DATABASE * NAVIGATING A DATASHEETThe navigation buttons provide another way to move vertically through the records * CREATING A SIMPLE QUERYA query is a question you ask about the data stored in a databaseThe Simple Query Wizard allows you to select records and fields quickly * CREATING A SIMPLE QUERY
  • 5. * CREATING A SIMPLE FORMA form is an object you use to enter, edit, and view records in a databaseYou can design your own forms, use the Form Wizard, or use the Form tool to create a simple form with one mouse click * CREATING A SIMPLE FORM * CREATING A SIMPLE REPORTA report is a formatted printout (or screen display) of the contents of one or more tables in a databaseThe Report tool places all the fields from a selected table (or query) on a report, making it the quickest way to create a report * CREATING A SIMPLE REPORT * CREATING A SIMPLE REPORT *
  • 6. CREATING A SIMPLE REPORT * PRINTING A REPORTOpen the report in any view, or select the report in the Navigation PaneTo print the report with the default print settings, click the Office Button, point to Print, and then click Quick Print orTo display the Print dialog box and select the options you want for printing the report, click the Office Button, point to Print, and then click Print (or, if the report is displayed in Print Preview, click the Print button in the Print group on the Print Preview tab) * VIEWING OBJECTS IN THE NAVIGATION PANE * PENN STATE ERIE, The Behrend College Sam and Irene Black School of Business MIS204 Dr. Kathleen Noce 5/5/2012 2:58 PM 1MIS 204Microsoft Access – Skill SheetSkills:1. Start Microsoft Access2. Create a new database.3. Save your database to a folder on your P: drive.4. Work with Tables.5. Work with Queries.6. Work with Forms7. Work with Reports.There is a basic sequence of steps with Access that you need to follow in order to successfully create a database. If you try to perform these steps out of sequence, you will encounter enough difficulties to jeopardize your overall success. The steps are:· Create your database. You
  • 7. only have to do this once, after that, you can open your existing database and make the necessary changes to it. · Create each table in the database. First you create the table, and then you create the fields (columns) that to in the table. You have to repeat this step for each table in your database. As you add each field, you must define any special field attributes, such as numeric, alpha-numeric, primary keys, field edits, table relationships, etc.· Load the data into your table. There are a variety of ways to do this. You can key it into the table, you can import it in from an Excel spreadsheet, or use a specially designed form that you designed to enter the data. · Create your queries. These queries will help you select specific records (rows) in your table, as well as update the data in your tables. · Create your forms. Forms will provide a structured method to enter and maintain data in your database. · Create your reports. Reports allow you to select, sort, print, and perform calculations on your data so you can display a report. Users can look at your reports online or in a hard copy format.You can, of course, go back to a database you have created and make changes to your database. You can create additional forms and queries as necessary. If however, you try to start by creating your reports before you build the database, you will be dealing with predictable but unfortunate results. The purpose of this document is to give you basic information on each of the different functions that you need to use to complete your assignment. I’m hoping you will find it useful to help you find a place to start when you need to perform a function within Access. This document is not intended to be a fully comprehensive Access manual. It does not cover every function, option, or every way to perform a function in Access.I provide step-by-step instructions on how to perform each function required for our Access assignment. If you find something that is missing or unclear please notify me so I can address it. Unless I state otherwise, these notes assume that:· You are logged on to a computer that has Microsoft Access 2007 installed.· You have Microsoft Access 2007 running on the
  • 8. computer.· You have your database file opened to the Database window. Start Microsoft AccessBefore you can work in Microsoft Access 2007, you have to successfully log on to a computer with Access 2007 installed on it. If you are on a PSU computer, you have to log on and connect to the PSU network. You have to know your PSU user ID and password. · Sign on to the computer you are using.· Start – Programs – Database Programs – Microsoft Access.To create a new database, · Click on the Blank Database icon and click OK. · Type the name of the database in the File Name field in the lower right hand corner of the screen.· Click on the folder icon to the right of the File Name field to select the path (drive letter and folder) where you want to save the data base. This should be a folder on your P: drive.· Click Create.If want to open an existing database click on the Office button – Open and navigate to the database you want to open. It may also be possible to open the database from the list of recently used databases on the right hand side of the window.Saving Your DatabaseWhen you are working on a PSU computer, make sure you save your work to your personal network share (P: drive) on the PSU network. Make sure you write down the path to the database so you can find it again. The database is a file that contains all the related information. To the operating system, the database looks like one file with the file extension of .accdb. All of the tables, queries, reports, etc. you create in the database, are all stored inside this one database file.You should periodically save your database as you are working on it. The easiest way to do that is to click on the save icon at the top of the window next to the Office button. Once you have created your database and given it a name Access will save your database automatically when you close it. Working with TablesA table is a logical organization of related information in your database. You can and will have multiple tables in your database. While there is no specific number of tables a database should have, you should utilize your superior judgment skills when you design a database. It generally
  • 9. makes sense to group a set of related fields into one table. The rule of thumb is that you never want to have the same information in more than one table, except for common fields. If you have more than one table, you have to join them together in order to use information from each table in one query or report. In order to join one or more tables together, you need a common field in each table so Access can match them together based on their value.We have 3 tables in our project. The artist table contains information related to individual artist such as name, phone number, and web site. There is one record (row) for each artist in the artist table. The product table contains information about each of the products (CD’s) we sell. There is one record (row) for each product. The reason we have two tables is that we don’t want to repeat information, such as the artist name in each product record. What we do instead is enter the artist code in each product record, and then find a matching artist record by matching the value of the artist code in each product record, and obtaining the artist name from the appropriate artist record.Create a Table· Click on the Create tab· Click on the Table icon in the upper left hand corner· Click on the down arrow below the View icon· Select Design View· When the Save As window appears, enter the name of your table in the Table Name fieldAccess will display a window for you to enter the fields in the table. Once you create a table in Access, it will be listed in the All Tables column on the left hand side of the screen. You can switch from table to table by clicking on the table name in this column. Add/Change Fields in the TableFields (columns) are the smallest unit of information in the table and database. Even though fields are made up of a varying number of bytes, it is impossible to directly access the individual bytes within Access, only the fields. You need to define a separate field for each piece of information you want to store and individually access. For example, in our database, we have separate fields for artist name and web site. This is because we might want to sort on the artist name, or we might only want to print the web site. There are basically two data
  • 10. types, text and numeric. Text data includes both alpha and numeric characters. Whenever you work with text data, you have to enclose it in quotes. For example, if you are looking for all the artists with a music style of jazz, you type it as “Jazz”. Numeric data contains only numbers, and a few selected special characters. You don’t enclose numeric values in quotes. If you are looking for all the product records with unit costs greater than $7, you type it as >7. You can only perform arithmetic computations of fields defined as a numeric data type. Numeric data types include number and currency. If you try to use a text field in a numeric computation, it won’t work. To create a new field in your table:· Make sure you are in design mode.· Go to the bottom of the fields displayed to add a new field on the next line (first non-blank).· Type the field name and select the data type. · If you select a data type of text, the field size will appear as an option in field properties section with a default size of 255. Highlight the field size and type in the correct field size. · If you select a numeric data type, such as number or currency, the field size will default. You can change the field size in the field properties window. · Press Enter. · Repeat this step for each field you have to add.To change an existing field in your table:· Click on Tables in the Objects column in the left hand side of the window.· Click on the icon of the table you want to change.· Click on Design.· Highlight the field you want to change and make your changes. Primary KeyThe primary key is data that Access uses to find specific records in your table. For example, in each record of our user table, we have a field called user ID. The user ID must be unique (different) for each record. When you want Access to find that specific record, you must provide the user ID. To make a field the primary key: · Right click in the column to the left of user ID.· Select Primary Key.In this assignment, we don’t want to define a primary key for the Sales table, because whenever we read the file, we read the entire file, not just one record. Additionally, if we sell the same CD multiple times on the same date (this is what we want to
  • 11. happen) we will have multiple Sales records with the same product code, sales date and sales price. If we have multiple records with the same primary key, Access will not let us store them. Therefore, we don’t want to define a primary key for the Sales table. Field Properties When you are working with fields in the design view Access will display the Field Properties window directly below the field definition window. The exact content of this window will vary with the different field types. You will use the fields in this window to define the specific attributes of the field such as size, whether or not it is required, etc. Field SizeEnter the length of the field. Input MaskEnter an input mask to define a pattern for the data to be entered into this field. For example, a telephone number would be defined as 000-000-0000, a social security number 000-00-0000. You can skip this if you don’t need it.CaptionEnter a label to be used for the field when it is used on a form. If you skip this, the field name will be used.Default ValueA default value is a value for a field that always defaults into the field when the record is created. For example, you may want the word “Jazz” to default into the style field because so many of the artists perform jazz, and you won’t have to type it each time. You will only have to go back and change the word from Jazz to another valid value for style.To set default value:· In the default line for the field, type the default value. If the data type is text, you have to enclose it in quotes.Validation RuleYou will want to add validation rules (commonly called edits) for certain fields in your database. This is important because it prevents users from entering information in the field that doesn’t make any sense. If you have five valid values for style, then you only want the users to enter one of the five valid values into the product table. To add validation rules:· Type the values that are acceptable, for example “Jazz” or “Folk” or “Pop” in the validation rule field. Be sure to enter the word or between each acceptable value. Access will add the double quotes around each field for you. Validation TextIf you enter a validation rule, you have an
  • 12. obligation to enter a corresponding message that you want Access to display the data entered doesn’t match the validation rules. There is nothing more frustrating for users than to have a computer system reject what they are entering, and not tell them why. Make sure your validation text makes sense to you, and to the users of the database. To add validation text,· In the validation text field, type the message you want displayed, for example “Invalid Style”, when the data doesn’t meet the validation rules (pass the edits). The more detail you provide the user, the better.RequiredEnter Yes if the field is required, No if it is optional.Allow Zero LengthEnter Yes if you want to allow zero length entries in this field, No if you don’t.IndexedEnter Yes if this is a key field, No it it isn’t. If you enter Yes the value of this field must be unique across the entire data base. Unicode CompressionEnter No.IME ModeSelect No Control.IME Sentence ModeSelect None.Smart TagsLeave blank.AlignmentSelect the appropriate alignment for the field. If you’re not sure, select General. Saving your TableWhen you are done adding and changing the fields, close the table window and save your changes.To close the window and save your changes:· Click on the X in the upper right hand corner of the table window to close the table.· Click on Yes to save your changes to the table.· In the Save As field type the table name in the format specified in the assignment, for example, Artist and click on OK. This will save your table.You can also click the Save icon in the upper left hand corner of your screen at any time to save your database.Add/Change Data in the TableAfter you have your tables designed, you need to load your data into them. It is possible to design a form for this purpose, but initially you can load the data directly into the database in the datasheet view. This permits you to quickly load a lot of data so you can get your database up and running as soon as possible. To add or change the data in the table: · Click on Tables in the All Tables column on the left hand side of your screen. · Double-click on the table you want to maintain.To add data:· In the first row without data, type the
  • 13. appropriate information in each field. · Press Tab to advance to the next field.· When you get to the end of the row, press Enter.· The cursor will advance to the next row after you finish entering a row of data. · Repeat this process for each row of data you want to load. To change data:· Select the record you want to change.· Tab to the field you want to change.· Highlight the data you want to change.· Make your changes.· Press Enter.When you finish adding or changing the data in the table,· Click on the X in the upper right hand corner of the table window to close the table. Importing Data into a table from Excel There are many cases where it may be more convenient to import data from an Excel spreadsheet then it is to key the data into the datasheet in your database. You have to meet a couple conditions before you can import data from Excel: · The data must be set up in Excel exactly the way it has to go into an Access datasheet. · You must have column headings on the first row of the Excel spreadsheet that match the field names in your table. To import data into your database: · Close the table you want to import data into. · Click External Data – Excel Spreadsheet · In the Get External Data – Excel Spreadsheet window: · Click the Browse button and navigate to the folder where the Excel file is located · Select the file and click Open · Select Append a copy of the records to the table · Select the Table you want to copy the records into from the drop down box · Click OK. When the Import Spreadsheet Wizard opens: · Select the worksheet (usually worksheet 1) that contains the data you want to import and click Next
  • 14. · Confirm that the first row of data contains the correct column headings and click Next · Confirm that the table you want to import into is displayed in the box and click Finish. · If the warning window shown above appears, click Yes to proceed anyway. · Click close. Do not check Save import steps. · Open the table to confirm that the data has been copied into the fields correctly. Joining TablesJoining tables is pretty much a non-event in queries. When you add more than one table to a query, it automatically creates a relationship between the two common fields in the two records. A “join line” between the two tables graphically illustrates this relationship. In the above illustration, you can see that the Artist and Product table are joined together because there is a line between the Artist Code in the Artist Table and the Artist Code in the Product Table. Artist Code is the common field that both tables contain. Since the line is bold and you see the 1 and infinity symbols, you can tell that there is a one to many relationship between the Artist and Product table (1 artist can have many products). You can also see that the Product Table is linked to the Sales Table because there is a line from the Product Code in the Product Table and the Product Code in the Sales Table. If you don’t see a line between the common fields in each table, then the tables are not joined. Your queries will most likely run, but they will not yield the correct results. You can correct this problem by simply pointing to the common field in one of the tables, holding down the left mouse button and dragging to the same field in the other table. Access will add the line, and the tables will be joined together.
  • 15. Referential Integrity and Table Relationships There are times when you want to establish a permanent relationship between two tables in your database instead of simply establishing a relationship for the purpose of a query. One reason to do this is to establish a referential integrity check between two tables. Referential integrity edits the value of the fields the tables are joined to make sure they are valid. Let’s say that you have a referential integrity relationship established between the Artist and Product table based on artist code. When you create a new product record, and you enter an artist code of LC01, it checks to make sure there is an artist code of LC01 in the Artist table. To establish a relationship: · Database Tools – Relationships. · When the Show Table window appears, add each of the tables you want to establish a relationship for. · While holding your left mouse button down, drag the cursor from the field in one table to the matching field in the other table. · The Edit Relationships table will display. · Select Referential Integrity. · Click Create. To edit the relationship: · Right click on the middle line between the two tables and select Edit Relationships. · Make your selection from the Edit Relationships window. · Click OK. When you finish creating or editing the relationship, · Click on the X in the upper right hand corner of the table window to close the table. Working With Queries Queries add a great deal of functionality to Access. You can use a query to view, change, and analyze data in a variety of
  • 16. ways. You can use the Query Wizard to help you create a query. This is sometimes the easiest approach, but it also limits your flexibility. Additionally, you can use the design query function to design a query from scratch. Select QueriesThe most common form of query is a select query, where you use the query capability of Access to select certain records from your database. You can print the records you selected, or you can use the query as a source of records for other forms, reports, and data access pages. To create a new select query,· Create – Query Design· In the Show Table window, click on the Tables you want in your query and click Add. Repeat this for every table you want to include in your query.· After you select all the tables you want in the query, click Close.· In the first column, click on Field Name. Use the down arrow to select the field you want.· Repeat this for each column (field) you want to include in your query.· In the sort row, select the fields you want to sort on, and use the right down arrow to select whether you want to sort in ascending or descending sequence.· If you do not want to show the field in your output, unclick the show row for that field.· If you only want to select certain records, use the criteria field to enter your selection criteria. If you are selecting text data, enter the value you are searching for.You can also change your existing queries. After you open the query in the design view, the commands are the same.To change a select query,· Create – Query Design· In the Show Table window, click on the Queries tab you want in your query and click Add.· Make the appropriate changes.· Click on the X in the upper right hand corner of the query window to close the window.· Click on Yes to save your changes.You can create queries to select certain records based on what you need to see. For example, you can select only the records where a field in the table has a certain value.To select certain records, · Enter a formula in the criteria row for the field. For example, >7 will limit the report to records with unit costs greater than $7.· If you want to select records that have a certain text value, such as a certain set of codes, you can enter the code you are looking
  • 17. for in the criteria field. For example, if you enter Jazz, Access will return all the records that have Jazz in the field you are matching against. A couple things to watch out for here … you don’t have to enter the quotes around the text, but Access will automatically put the quotes around the text. You do have to enter the correct operator. This can be confusing, and if you don’t think about it, it will cause you to select the wrong records. Let’s say you are looking for all the records with Jazz or Folk. You might think it is logical to type Jazz and Folk in your criteria, but it won’t work. Whenever you include the word “and”, Access assumes that both conditions must be true before it selects the record. Since each record only contains one of the codes, there will never be a time when both conditions are true. The proper selection criteria are Jazz or Folk, so Access will select the records that contain either one of these values.Unique Values OptionThe unique values option allows you to print the values of certain fields in your table only once. For example, suppose you have 20 records that contain 5 different style codes and you want to find out which style codes are used. Setting the unique values option will tell Access to only select one record for each value. To set the unique values option, · Right click on the Criteria field in the design area.· Select Properties from the pop up window.· Click on Unique Values and select Yes from the criteria line on the right hand side of the screen.· Click the X in the upper right hand corner of the Query Properties window to close the window and save your change.· Note: You can only print the one field from the table. Calculating a Value with Field FormulasYou can create queries that calculate values for new fields. You can create a new field that contains the total of the two other fields.To calculate a new field:· Go to a new column, for a new field.· Right click on the field row.· Select Build … to start the Expression Builder.· In the Expression Builder window:· Select the table(s) that contains the fields you want to work with.· Select the first field from the list of fields and click on paste.· Click on the appropriate operation sign.· Select the
  • 18. second field from the list of fields and click on paste.· Click OK.· Change the word Expr1 to whatever you want to call the total, for example Total or Profit.Update QueriesYou can use an update query to change the value of different fields in your database.To create an Update Query:· Create – Query Design· Add the table you want to update to the query.· Click on the Update button in the toolbar.· For the field you want to change, type the value you want in the field in the Update To line.· To execute the update, press the Run (red exclamation point) icon, 4 icons to the left of the Update icon. Delete QueriesYou can use the delete query function to delete records in your database based on the value of certain fields in your database. It is a really nice powerful feature, but it can also make a mess of things if you make a mistake and end up deleting the wrong records. Use this feature carefully.To make a query a Delete Query:· Create – Query Design· Add the table you want to delete records from to the query.· Click on the Delete button in the toolbar.· In the column of the field you want to base your deletion on, go to the delete row and choose where or from. Where means that you want to delete any record where the value of this field is equal to the deletion criteria. From means that you want to delete any record where the value of this field is greater than or equal to the value in the criteria field. · Type the value of the field you want to match against in the Criteria field.· To execute the deletion, press the Run (red exclamation point) icon, 6 icons to the left of the Delete icon.Total QueriesYou can use total queries to see totals of different groups of data. To make a query a Total Query:· Create – Query Design· Add the table(s) that contains the fields you want to total.· Click on the Totals icon at the right hand side of the ribbon. The words “Group By” will appear in each row in the Total column.· In each numeric column, use the down arrow to change the word “Group By” to some other word, such as “sum” or “average”, depending on the operation you want to perform.· For each column you want to group by, leave the words “Group By” in place. · In all the other columns,
  • 19. delete the words from the total row.· Close the query and open it again in the datasheet view.Working with FormsA form permits you to add, change, or display one record at a time. It is less confusing for users to deal with one record at a time, and to only see the record they are dealing with. Access provides a form wizard to help you quickly create forms. Of course, you can bypass the forms wizard and create the form yourself. To create a form for a table: · Select the table you want to maintain with the form from the All Tables column. · Create – Form · Select the Form View to see the form. · Select the Layout View to see the layout of the form. · Select the Design View to maintain the design of the form. · Click on the X in the upper right hand corner of the table window to close the form.· When the window displays, enter the name of the form and click OK. Although it is not required for this class, you can go into the design window and manually change the layout of your form. You have a lot of freedom when you do this because you can change almost anything, but it can also be very frustrating because you don’t always end up with things looking the way you want them to.To change an existing form: · Select the form you want to change from the All Tables column, · Design – View – Design View· Make the appropriate changes to the form.When you are finished creating or changing your form, make sure you save it.To save the changes to your form:· Click on the X in the upper right hand corner of the form window to close the window· Click on Yes to save your changes. One of the things that is different about a form is that you only see one record at a time. You can use the arrows at the bottom of the screen to advance forward and backward through the records in the table. If you want to go to the end of the table to enter a new record, press the star key. If you want to jump to a specific record, enter the record number you are looking for. Working with ReportsAfter you have your database up and
  • 20. running and data loaded into it, you may want to create a report. If you are designing a data base from scratch, it is a good idea to think about what you want to print on the reports so you make sure you have the data you need in the data base. Otherwise, you end up utilizing some of your Access skills to make design changes which can be cumbersome and time consuming. To create a new report:· Create – Reports – Report Wizard· In the Report Wizard window, · Click on the down arrow in the Tables/Queries field to select your table.· Highlight the field you want on the form and click on >, or click on >> to select all fields. · Click on Next.· Select any report groupings that you want. Groupings are really neat. They provide a way for you to group the records in your report in a logical sequence. For example, you may want to group all the records for a specific department together. · Click on Next.· Select the order you want the report sorted in. In the first field, select the most important field from your database, in the second field; select the second most important field in your database.· Click on Next.· Select the report layout and orientation that you want.· Click on Next.· Select the report style that you want.· Click on Next.· Type the title of the report, for example, High Cost.· Click on Finish.· Access will display a copy of the report, at least the first page of it. You will probably need to modify the report to make it look right.To modify the report layout:· Right click on the Report from the All Tables column on the left hand column and choose Design view.· Make the appropriate changes.After you finish adding or changing your report, save your changes.To close the window and save your reports:· Click on the X in the upper right hand corner of the report window to close the window.· Click on Yes to save your changes. Access Assignment #2 (25 Points) Note: Access Assignment #1 must be completed first before beginning Assignment #2. Problem/Objectives of the Assignment:
  • 21. The employees who staff the gift shop have determined a number of questions they want the database management system to answer. You must obtain answers to the questions posed by the volunteers using Microsoft Access: Create a series of queries to answer questions associated with the BoarDome Database. Instructions: Perform the following tasks after you open the database you created for Assignment One: Create a query for the Product Id, Description and Selling Price for all the records in the Product Table sorted by Product Id. Label ProductId Query. Create Only a query for the Product Id, Description and Selling Price for all products with the Vendor Code of MS. Label as MS Query. Create a query for the Product Id, Description, and Vendor Code for all products that cost more than $20. List the records in descending order by Cost. Label as Cost Query. Create a query for the Product Id and Description for all products that have a Selling Price of $5 or less. Label as Selling Price Query. Create a query for all fields for those products that cost more than $10 and where the number of units on hand is less than 10. Label as Low Inventory Query. Create a query for all fields for those products that have a Vendor Code of WW or have a Selling Price less than $10. Label as WW-Vendor Code Query. Join the Product Table and the Vendor Table. Create a query for the Product Id, Description, Cost, Name and Telephone Number fields. Label the query as Product and Vendor Query. Restrict the records retrieved in Task 7 to only those products where the number of units on hand is less than 10 (Also show the Number of Units on Hand). Label the query as Inventory Less than 10Query. Create a query for the Average Cost and Average Selling Price for all products. (Just two fields should be displayed). Label as Average Query.
  • 22. Select Product Id, Description, On Hand and Cost. Compute the On Hand Value (On hand*cost) for all records in the table. Label asOn Hand Query. HINT: (Enter your formula in the blank field to the right of Cost). Create and save the following validation rules for the Product Table in Design view. a. Make the Description field a required field. b. Ensure that any lowercase letters entered in the Product Id field are converted to uppercase. c. Specify that the on hand units must be between 0 and 100. Include validation text. SSave the changes. Open the Product Form you created in Assignment #1, and add the following record to the Product table. MN04 board game 4 $17.50 $21.94 WW Access Assignment #1 (BoarDome Database) (25 Points) Problem: BoarDome is in the business of producing skate, surf and snow boards. They run a small museum and gift shop, located in airports in cities where the extreme sports are big. The gift shop purchases products from vendors for products and merchandise with the company name on them. The director of the gift shop has asked you to create and update a database that employees can use. The database consists of two tables; The Product table contains information on items available for sale. The Vendor table contains information on the vendors. Objectives of the Assignment: Using Microsoft Access: 1. Create a new database in which to store all the objects related to the gift shop system data. 2. Create tables and an input form 3. Populate the tables using data supplied
  • 23. 4. Perform file maintenance to tables 5. Generate a report utilizing the data Instructions: Perform the following tasks. 1. Create a new database called BoarDome Gift shop Database. 2. Create a Product Table using the structure shown below. Use the nameProductfor the table name and save it with a File name = Product – Your Name. Field Name Data Type Field Size Description Product Id Text 4 User Id Number, Primary key, Yes (No Duplicates) Description Text 25 Description of the Product On Hand Number Long Integer Number of Units On Hand Cost Currency Cost of Product Selling Price Currency Selling Price of Product Vendor Code Text 2
  • 24. Code of Product Vendor, Yes (Duplicates OK) 3. Add the data shown below to the Product Table. Product Id Description On Hand Cost Selling Price Vendor Code CH04 hoodies 11 $26.75 $28.90 WW DI24 lanyards 14 $3.75 $4.95 MS GL18 hats 2 $27.50 $29.95 MS JG01 glasses 3 $5.40 $6.95 MS PC03 mugs 5
  • 26. = Vendor – Your Name. Field Name Data Type Field Size Description Vendor Code Text 2 Vendor Code (Primary Key), Yes (No Duplicates) Name Text 20 Name of Vendor Address Text 15 Street Address City Text 15 City State Text 2 State (Two-Character Version) Zip Code Text 5 Zip Code (Five-Character Version) Telephone Number Text 20 Telephone Number (999-999-9999 Version Note: Use the Phone NumberInputMask format 5. Add the data shown below to the Vendor Table.
  • 27. Vendor Code Name Address City State Zip Code Telephone Number AR Artisan's printer 3540 Grand Hancock WI 69780 414-555-7865 MS Tshirts 4less 134 Union Delana SD 41345 605-555-3498 WW glassworks 655 Clive Great Falls WV 34567 304-555-4532 6. Create a form for the Product Table. Use AutoForm Wizard to create your form. Save the form as “Product – Your Name”. 7. Use the form you created to add the following two new products to the Product Table. Product Id Description
  • 28. On Hand Cost Selling Price Vendor Code CH08 Key Chains 12 $20.00 $25.00 AR PS30 Posters 20 $3.50 $4.50 MS 8. Create a report. Report should contain the following elements: Product ID,Description, On Hand, and Cost. · Use Report Wizard to create the report · Sort Order for your records = On Hand (Descending Order) · Layout = Tabular; Orientation = Portrait; Style = Concourse or any other style · Title = Inventory Report - Your Name. Output Requirements: · Save to your folder on the your pdrive or hard drive: 1. Created database entitled, BoarDome Gift shop Database One. 2. Two created tables entitled, Product and Vendor 3. One created form entitled, Product 4. One created Report entitled, Inventory Report.