0% found this document useful (0 votes)
12 views9 pages

Byounique Access Lesson

Uploaded by

wnakangajr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views9 pages

Byounique Access Lesson

Uploaded by

wnakangajr
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

©ByouniqueTrust2024

BYOUNIQUE ICT LESSONS


Introduction to Microsoft Access
Access Defined
Microsoft Access is a "relational" database application. Relational means we can link
together sets of data, we can relate the data. We can keep track of the patients, the
doctors and when the patients last saw their doctors, what happened at each visit and so
on. Access allows us to relate our data, without the repetition that may occur anywhere
else.
What is a Database?

A variety of definitions exist for a database; but essentially it's a collection of information. A filing
cabinet, a Rolodex, a library card catalog, and even the Internet are all types of databases.

Most often the word "database" is used to describe a collection of related "data" (information)
stored on computers. An electronic database should allow you to store, sort, and retrieve data.
You can create simple databases by creating a Word table or an Excel spreadsheet.

For example, here we have simple database of our patients:

MedRec# First Name Last Name DOB Doctor


123-456 Jack Nimbe 06/08/72 Edwards
987-654 Jill Pail 08/27/65 Lewis
753-951 Mary Bluebell 12/08/51 Edwards

Here is a simple database of our doctors:

EmpID First Name Last Nme Phone#


999-999 Ken Edwards 555-1234
888-888 Laura Lang 555-4567
777-777 Yolanda Lewis 555-7890

Why use Microsoft Access?

In an Access database, we can create both of the datasets and link them.

In Access the data is saved in Tables. As the data in the Tables change, the rest of the Access
database will reflect the newest information (i.e. the Queries, Forms and Reports).

1|Pre p are dByEs na rt H araw a


©ByouniqueTrust2024

QUERIES show the data in a Table format. A Query can pull from multiple Tables and allow you
to limit the records (rows) display by using criteria and showing only the fields (columns) you
want. We can find the phone number for Jill Pail's Doctor, and provide Ken Edwards with a list
of his patients.

FORMS can be created to provide a "user‐friendly" side to your database. They are used to view
and enter your data in an interactive formatted structure. Forms are also used to make menus
and search windows that turn a simple data collection tool into a more interactive user‐friendly
application.

REPORTS are created to print out your data in a formatted structure. They allow you to group
and organize your data. They can be used to create Form letters and mailing labels. Access works
beautifully with Word for mail merges, but the Reports tool allows for the multi‐level summaries.

Planning the Database

The most important part of creating a relational database is planning. This can be difficult when
you are first learning to use Microsoft Access. Here are some questions that may help:

1. Input ‐ what data do I already have for the database?


2. Output ‐ what information do I want to get out of the database?
3. Process ‐ what do I need to do to get there?

Sometimes it helps to plan the final Reports that you want from your database. For example,
we want to have a chart of how many patients attended their appointments. Do we track the
'cancellations' vs. the 'no shows'? What about the late arrivals and the rescheduled? If we want to
differentiate, we need to make sure we are going to collect that data. This is why it's so
important to plan everything, to try to predict the "what ifs" that may occur once you have your
data collected.

The Tables are the core of your Access database; these structures store the data. Tables are
essential to using any of the other Access Tools. When planning out your database try to
remember the basic design rules for your Tables.

Design Rules

Organizing Data

Once you have an idea of the data you would like to collect, you need to decide how many
tables you might want to use to organize the data efficiently. In Excel, we might keep several
numbered columns to keep track of things, i.e. Medication1, Medication 2…, but in Access we
should create a second table to track the numbered fields.

No Derived Fields

By using the relationships between our data sets, we can derive missing data. If we are creating a
new appointment for a patient, we only need to put in their Medical Record Number (or other
unique identifier). The patient's name, phone number, and other information can be derived
from the patient Table.

Data is broken down into Smallest Logical

2|Pre p are dByEs na rt H araw a


©ByouniqueTrust2024

Parts Pulling fields together in Access is often simple; pulling them apart usually requires human
intervention. Think of this as breaking up the data into its smallest sort‐able part.

Descriptive Field Names

It's tempting to use abbreviations when we are creating our data tables, but if the title we use is
too vague or too abbreviated we may not be able to recall why we created that field. DOB –
Date of Birth or Department of Babies? SSN – Social Security Number or Shands System Number?

Unique Field Names

Be sure to differentiate between the field names in each Table. We can have a 'First Name' in our
Patient Table and a 'First Name' in our Doctor Table but this can lead to confusion when we try
to pull both Tables into one database object.

No Calculated Fields

In Microsoft Excel, we can perform our calculations on the same sheet as our data, but a Table in
Access is stagnant data, it does not change unless you make it change. Access will let you create
calculations in Queries, Forms and Reports. Newer versions of Access do have a calculated field
type for the table. This embeds a calculation in the record and is not always reflected in a data
entry form.

Unique Records

It's important that each Table has a way to keep records unique. We can do this by setting one
field (column) to be a Primary Key field. When a field is set as a Primary Key, Access will not
allow any duplication nor blanks. When there is not a unique field in your data set, you can use
an AutoNumber. AutoNumbers are incremented or random fields that are always unique.

Basic Access Objects


Access consists of four main database objects: Tables, Queries, Forms, and Reports. Each object
has at least two views, Design and "Data". The Design View is where we build the structure of
that database object. The data view shows the output of the data and is different for each
object. Tables and Queries have a Datasheet View, Forms have a Form View, and Reports have a
Report View, or a Print Preview view. Each kind of object has its own purpose.

Tables

Tables store data. The Tables are the true 'database' (base of data). These need to be created and
properly linked (related) in order to effectively use the other Access tools. Tables are the core of
your database, everything else in Access depends on the Tables.

The Design View of a Table allows you to create and modify:

 Field Names (the column headings)


 The type of data stored in a field (Data Type). In this workshop we use:

3|Pre p are dByEs na rt H araw a


©ByouniqueTrust2024

Data Type Description


Short Text Allows any alphanumeric characters, up to 255 characters
Long Tex Large amounts of alphanumeric data: sentences and paragraphs –
64,000 characters
Number Limited to Numbers only
Date/Time Allows Dates and/or Times only
Currency Monetary values
AutoNumber Creates a unique number for each record.
Yes/No This is a binary field (only two answers, Yes/No, True/False)
OLE Object Pictures, graphs, or other ActiveX objects from another
Windows-based application
Hyperlink A link address to a document or file on the Internet
Attachment You can attach files such as pictures, documents, spreadsheets,
or charts; each Attachment field can contain an unlimited
number of attachments per record, up to the storage limit of
the size of a database file.
Calculated You can create an expression that uses data from one or more
fields. You can designate different result data types from the
expression
Lookup Wizard… Displays either a list of values that is retrieved from a table or
query, or a set of values that you specified when you created
the field. The Lookup Wizard starts and you can create a
Lookup field. The data type of a Lookup field is either text or
number, depending on the choices that you make in the
wizard.

Descriptions, which will be displayed in the status bar in the Data view of Forms and the
Properties of each field, such as how many characters can be entered (text field size), or how the
data is formatted (05/05/15 or May 5, 2015).

The Datasheet View of a Table allows you to create and modify the data within a grid structure
based on the settings in the Design View.

Vocabulary

A collection of fields make up a record. A collection of records make up a Table. A collection of


Tables make up a database

Field – One column of a Table common to all the records

Record – One row of a Table containing all data about a particular entry

Table – One set of related data

Database – Structured collection of related Tables

The Navigation Pane:

4|Pre p are dByEs na rt H araw a


©ByouniqueTrust2024

The Navigation Pane is a list containing every object in your database. For easier viewing, the
objects are organized into groups by type. You can open, rename, and delete objects using the
Navigation Pane.

To Minimize and Maximize the Navigation Pane:

Click the double arrow << in the upper-right corner of the Navigation Pane to minimize and
maximize.

Sorting the Objects in the Navigation Pane:

By default, objects are sorted by type, with the tables in one group, the forms in another, etc.
However, you can change how the objects are sorted.

Click the drop-down arrow to the right of the All Access Objects and click on a sort option from
the list.

5|Pre p are dByEs na rt H araw a


©ByouniqueTrust2024

Queries
Queries show a selection of data based on criteria (limitations) you provide. Queries can pull
from one or more related Tables and/or other Queries.

The Datasheet View of a Query looks like a Table. All data added or modified in a Query, will
be saved in the Table. The Design View is where the structure of the Query is created. This is
where we choose the record sources and fields, and set the sort order and criteria.

Defining Criteria in the Query:

In order to control which records are displayed, you must define criteria in a query. The most
common type of query is the Select Records query which will be discussed below.

To Define Criteria for Your Query:

1. Position your cursor in the criteria row in the field for which you wish to define the
criteria for
2. Type the criteria

Example: To find all Excel courses:

3. Position your cursor in the criteria row of the Course ID field


4. Type Excel (Access adds the quote marks to the criteria automatically when you tab to the
next column)

5. Click the Run Query button

To Save the Query: 1. Click the Save icon 2. Enter a name for the query 3. Click OK

6|Pre p are dByEs na rt H araw a


©ByouniqueTrust2024

Setting a Primary Key:

The Primary Key is the unique identifier for each record in a table. Access will not allow duplicate
entries in a primary key field. When creating a new table, Access automatically creates a field
“ID” with the autonumber data type, and assigns this as the Primary Key.

To Set a Primary Key:

1. In Design View, position your cursor in the field you wish to set as the Primary Key
2. Click the Primary Key button on the toolbar
3. Save the table

Note: To turn off the Primary Key simply click on the Primary Key button again.

Forms

Most Forms display one record at a time, in a formatted user‐friendly environment. You can
build your Form so it will display multiple records. As you develop Forms you can create
navigation buttons, insert graphics, and change the colors to display everything
consistently. Forms have three basic views: Design View, Layout View, and Form View.

Your record source can be a Table or Query. If we want to *all* the patients use the Table; if we
only want to see Dr. Edward's Patients, use a Query.

7|Pre p are dByEs na rt H araw a


©ByouniqueTrust2024

The data entered or modified in a Form is automatically saved to the Table. The Table is the true
location of the data; the Form is a "pretty" way to view/modify/create the data.

We modify our Forms by using the Layout View to change the placement and size of the fields,
and the Design View to add objects like command buttons to move between records, and open
other database objects like other Forms and Reports.

8|Pre p are dByEs na rt H araw a


©ByouniqueTrust2024

Reports

Reports are designed to create an organized output of data from your database. With a Report,
you can group and summarize information. You can't edit the data in a Report, but if you make
the modifications in the Table, Query, or Form you will see the results when you open the Report
again. Reports have four basic views: Report View, Print Preview, Layout View, and Design View.

9|Pre p are dByEs na rt H araw a

You might also like