Beginning Access (Office XP)
Beginning Access (Office XP)
Beginning Access (Office XP)
Terms:
Record - A group of information about a given person, product, or event
Field - Each category or piece of information within a record. The fields are the
placeholders for the actual data to be stored within the database. Every record has the
same fields, but the fields store different data.
Field names a unique name given to each field in the database
Data type- tells Access the type of data the field will contain
Once you have opened the Access window you will be asked
to either create a new database or open an existing database.
To Create a New Database
1.
Click the Blank database option from New.
2.
Type a Filename
3.
Click Create New
To Open an Existing Database
1.
Click Choose File from New from existing file
2.
Choose the database of your choice from the list
3.
Click Create
Beginning Access XP
9/4/2003
The MS Access window should appear including the database window as shown below.
The Title bar, Menu bar, and Toolbar are familiar items, but the Database Window is
something unique to Access. Because a Database is made up of many different
Objects, this window displays all of the objects included in this database, listed by object
Title
type.
bar
Standard
toolbar
Menu bar
Database
Window
showing the
list of tables
in this
database
Buttons to
choose
the object
type to
display
Objective 3: Identify and describe the four main types of Access database objects.
4 main types of objects
Tables
Tables are the main elements in a database. They are where all the specific
data information is stored. All the other objects work off of the data in the
tables.
Queries
A Query is the method of asking the database a question. It is used to reorganize or extract specific records (data) from the table(s).
Forms
A Form is the method of making the database interactive via the computer
screen. Forms can provide a graphical interface for adding/retrieving
information to/from tables
Reports
A Report is a printed form of output from the database. It may include all
records from the tables, or specific records according to a query.
Beginning Access XP
9/4/2003
Tables
An Access file/database is a collection of objects (tables, queries, forms, etc), but the
fundamental element of a database is a table. A table is the object in the database file
that holds all the data.
Viewing Options
It is possible to view a table in two different ways: Design view or Datasheet view.
Design view
This view allows you to edit items within a table. There is no data displayed during
this mode. Fields and their properties are edited in design view.
Datasheet view
This view looks like a spreadsheet, and allows the user to edit and enter data within
a table.
View button
Beginning Access XP
Design View of
a table object
9/4/2003
Datasheet View
of a table object
Viewing options are similar for other object types in a database. The View button will
adjust accordingly depending on which object you are viewing.
Queries A Query can be viewed in either Design view or Datasheet view. The query
design view is a set-up grid for choosing fields and creating the question.
Forms A Form can be viewed in either Design view or Form view. The Form view is
the graphical interface used by a data entry person for example.
Reports A Report can be viewed in either Design view or Print Preview view. Since a
report is meant to be printed, the data view is a print preview.
Beginning Access XP
9/4/2003
To Create a Table
1.
Once you are in the database window, make sure the Tables button is selected.
2.
Click the New button on the Database Window toolbar.
New button
3.
4.
A certain amount of planning is necessary prior to creating the table, you should have a
good idea of how you will break down the data you want to store into pieces (fields).
You should have a plan for each field in terms of a name, what type of data it will hold,
and how you want to describe it.
Field names - unique names given to each field in the database
Data type- tells Access the type of data the field will contain
text a text field can contain any character it is limited to 255 characters
memo a memo field is essentially a large text field it can hold more data than a text field
number a number field contains numbers it is best suited for numbers to be used in a
calculation.
date/time a date/time field stores calendar data in various formats
currency a currency field contains dollar amounts it can also be used to display
percentages, scientific notation, etc.
AutoNumber this field will receive data automatically you can set the numbering system
There are a couple more specialized data types available as well.
Description - allows user to enter a detailed description of each field.
To Define Fields in a Table
Beginning Access XP
9/4/2003
Field Properties
The Field Properties box at the bottom of the table design window holds the settings for
the field size, format, and other specific properties of each field. There are a couple
things you may commonly want to set in this area, such as the field size, a special
numerical display format, or a default value for a specific field.
Field Size:
The General tab in the Field Properties area of the table design view shows the properties for a
field, the exact properties depend on the fields data type. A text field such as the State only
needs to store two characters. If you change the default 50 to a 2, then only 2 characters will be
placed into the State field.
Default Value:
A text field also allows you to set a default value that will automatically be stored as data in the
field, but could be changed if necessary. A good example for this database might be the State
field automatically defaulting to GA. Whatever is entered in the field properties area for the
default value will show up in the datasheet of the table.
Numeric subtype
The currency data type is designed to display various numeric formats such as percent
and scientific notation.
To Create a Numeric Subtype
1. Ensure that the Data type for the field you wish to create a Numeric subtype for is
set to Currency and that your cursor resides in that field.
2. Select the General tab from in the Field Properties area.
3. Click the Format drop down list arrow.
4. Choose the numeric subtype you desire.
Beginning Access XP
9/4/2003
Field Names
Record (entire
row)
Previous
record
button
Next
record
button
First record
button
Last record
button
1. Click on the View button to display the table in Datasheet view, if necessary.
2. Enter data into the first field.
3. Press the Tab key to move to the next field in the current record and enter data
in that field.
4. Continue until each record is complete.
5. Click the Save button on the Standard toolbar to ensure that the data has been
saved when finished.
To Move from One Record to Another Record
1. Use the Arrow keys on the keyboard to move up, down, left or right one
field/record at a time or click the Next record or Previous record button found
at the bottom of the table window. (The buttons with the line and arrow go to the
first/last record in the database.)
To Delete Records from a Database
1. Select the record to be deleted by clicking in the Record selection box to the
left of the record. (You can also click and drag down to highlight multiple records.)
2. Press the Delete key on the keyboard.
3. Click Yes to confirm the deletion.
Beginning Access XP
9/4/2003
1. If necessary, click the View button on the Standard toolbar to return to the
design view of the table.
2. Insert your cursor into the correct field. (The field type must be set to Text.)
3. Click on the Look Up tab in the Table Properties area.
4. Choose Combo Box from the Display Control drop down list.
5. Choose Value List from the Row Source Type drop down list.
6. In the Row Source box, type in your list of possible values separated by semicolons.
Beginning Access XP
9/4/2003
The datasheet view of this table will now display a drop down arrow in this field (picture
below) The item can be chosen by clicking the arrow, and then clicking on the choice
from the list.
1. If necessary, click the View button on the Standard toolbar to display the table in
datasheet view.
2. Click on the Field Name that you wish to sort by. (This should select that entire
field.)
Beginning Access XP
Sort Descending
button
9/4/2003
Run Button
Query Window
Design Grid
1.
2.
3.
4.
5.
Beginning Access XP
10
9/4/2003
A note about the Criteria conditions: You can use the comparison operators (<, >, =,
or <> for not equal to) for numbers, or for text strings as well as other data types. If you
are comparing a text string constant, you have to enclose it in double quotes. If you are
using a date constant for comparison, you must format the date as M/D/Y enclosed with
pound signs (#8/20/98#)
1.
2.
3.
4.
Add a Field
Beginning Access XP
11
9/4/2003
Form Window
Notice you can scroll through the existing records, make edits, and add new records
from the Form window. Any changes made while displaying the form, will also change
the table (or query) from which the form was created.
You can make adjustments to the form by viewing it in Design view. Each item within
the form is called a control, and each control can be edited/resized/reformatted.
First
Previous
Beginning Access XP
Next
Last
New
12
9/4/2003
1.
2.
3.
4.
Add button
Beginning Access XP
13
9/4/2003
Beginning Access XP
14
9/4/2003
Labels
Access will allow you to create any type of label that you wish by selecting the label
manufacturer and the information to put on those labels. This means that you could
create mailing labels, nametags, etc. The process for creating labels is very similar to
the regular report wizard.
To Create a Label
1.
2.
3.
4.
5.
6.
7.
8.
9.
Beginning Access XP
15
9/4/2003