You are on page 1of 18

ABOUT MS ACCESS

Microsoft Access is a Relational Database Management System (RDBMS), designed primarily for home or
small business usage.

Access is known as a desktop database system because it's functions are intended to be run from a single
computer. This is in contrast to a server database application (such as SQL Server), where it is intended to
be installed on a server, then accessed remotely from multiple client machines.

Microsoft (or MS) Access is a software package that you install just like any other software package, and is
bundled as part of the Microsoft Office suite.

Access Versus Excel

You may be wondering what the benefits of using Access are compared with using an Excel spreadsheet.
Well, it really depends on what you want to do with the data that you're storing and how much data you
intend to store.

Excel may be fine if you've only got a small amount of data, and if you don't have many attributes against
each piece of data. It may be fine if you don't have much in the way of relational data across multiple
worksheets. Once you start storing many attributes against each piece of data, and perhaps you find
yourself repeating information across multiple worksheets, then it's time to start using Access (or another
database system if you prefer).

Another important reason for using Access over Excel is, if you need to generate a lot of queries and
reports. Access is much better suited for doing this compared to Excel.

Microsoft Access Database File Extension

When you create (and save) a database in Microsoft Access, the database is saved with a .mdb extension.
This is the file extension you will use the most, when developing Access databases. Once you've established
your database, you also have the option of saving it as an MDE file, which gives you some benefits over the
MDB file. An MDE file uses a .mde extension.

CREATE A DATABASE

Creating a database in Microsoft Access is relatively straightforward. This lesson demonstrates how to create
a database.
1. You may notice that, whenever you start Microsoft Access, you see the following screen. In this
case, you can simply select "Blank Database".

If you already have Access open, you can go to the "File" menu and click on "New Database":
2. Choose "Blank Database". (Skip this step if you already chose "Blank Database" at step one). You
also have the ability to choose from a template, but we'll just use a blank database here:

3. Choose a location to save the database:

Your New Database

Once you've completed the above tasks, you should see a blank database, like this:
We know this database is blank because it doesn't have any tables. If it did, you would see these tables in
the middle pane of the table tab. Now that we have our blank database, we can start adding some tables.

CREATE A TABLE

With database management systems, you need to create your tables before you can enter data. Microsoft
Access makes creating tables a breeze.

Using our blank database from a previous lesson, we are going to create a table called Individual. This table
will have 4 columns: IndivdidualId, FirstName, LastName, and DateCreated.

Design View

"Design View" enables you to create your database tables and specify the columns and their data types etc.
The following steps demonstrate how to switch to Design View and create a table.
1. Ensuring you have your blank database open and you're on the following screen (with the "Tables"
tab selected), click "New":

2. Select "Design View" and click "OK":

3. Fill out the details in the "Field Name" column and the "Data Type" column. Here, we are creating
the column names and specifying the type of data that can be entered into them. Restricting the
data type for each column is very important and helps maintain data integrity. For example, it can
prevent us from accidentally entering an email address into a field for storing the current date.
Other options for each column include restricting the length of data (under "Field Size"), setting a
default value (this is used if someone leaves the field blank), specifying whether the data is
required, and more. Leave these options with their default value for now.
4. Click the "Save" icon, enter the table name ("Individual"), and click "OK":

5. When prompted to set a primary key, click "Yes". (A primary key ensures that the data in this
column is unique - no two values can be the same. This is important for when you need to select or
reference data from this column):

Datasheet View

You have now created a database table called "Individual". You can now switch between "Design View" and
"Datasheet View" as you wish. Datasheet View allows you to see any data that has been entered into the
table.
1. From the "View" dropdown icon, click "Datasheet View" (this changes the view from Design View, to
Datasheet View):

2. You should now see something like this:


We have just created a database table. This table doesn't have any data yet, but we have created the
columns that are required before any data is entered.

ADDING IN DATA

In Microsoft Access, there are two primary methods of adding data to your database. Strictly speaking,
there is a third method (using SQL), but we'll save that for later.

Here's an explanation of the two main methods.

Direct entry

You can type directly into the table while it's in Data Sheet view. Initially, this may seem like the quickest
and easiest method, but it's not suitable if you have lots of data, and/or if non-technical users need to enter
data.

Form

You can set up a form, so that non-technical users can enter data into the form. Once they submit the form,
the data is automatically inserted into our table. The form could insert data into multiple tables too - saving
you from having to open up each table to manually insert the data.

Access provides a form wizard, which steps you through the process to building a form. We'll cover this in
the next lesson.
 

As mentioned in the previous lesson, forms provide non-technical users the ability to add data to your
database.

Here are the steps involved in creating a form in Access.

1. Ensuring the "Forms" tab is selected, click "New".


2. Select "Form Wizard" and click "OK". (For now, we'll use the "Form Wizard" to create a form. Once
you become comfortable with creating forms, you can choose another option if you prefer).
3. Select the fields that you need on your form and click "Next". In this case, we only need the user to
enter first name and last name, so we choose those two fields:

4. Choose which layout you'd like your form to use. Leave this at the default ("Columnar") and click
"Next":
5. Choose which style you'd like your form to use. Leave this at the default ("Clouds") and click
"Next":

6. Choose a name for your form and click "Finish":

Your form should now look something like this:


This is a very basic form and in most cases, you'd have a lot more fields on your form. You can see that the
form is already presenting the first record in our Individual table.

 To jump to the next record, click the button.


 To jump to the last record, click the button.
 To jump past the last record so that it's blank and ready for a new record to be entered, click the
button.

In the previous lesson, we used the "Form Wizard" to create a form. In this lesson, we're going to modify
the form.

At the end of that lesson, we were able to see our form in "Form View". Form View is the way the form is
intended to be viewed by the user. If we want to modify it, we need to switch to "Design View".

Selecting "Design View"

To switch to Design View, select "Design View" from the "File" menu:
Enlarging the Form

To make the form taller, click on the "Form Footer" panel and drag it down. To make the form wider, click
on the edge of the form and drag it across:

Adding a Field

Let's say we want to add the IndividualId field to the form. To do this:
1. Select "Field List" from the "View" menu:

2. You should now see a "Field List" panel. From this panel, click and drag the field you want onto the
form area. When you release your mouse, the field will be added to the form:
Re-arranging the Fields

You might have noticed that the label for our fields appear exactly as the name of the field. This is OK, but
we have no space between multiple words (i.e. "FirstName" appears instead of "First Name"). You can fix
this by simply clicking in the label area and re-wording the label.

Also, while we're changing the form around, let's move the IndividualId field to the top of the form. To move
the fields around, click on the edge of the field and hold your mouse down. When you see the cursor turn
into a hand, reposition the field to the new location, then release the mouse.

You can re-size a field by clicking the edge and dragging once your cursor turns in to a two-headed arrow.

Properties

For any element that you select, you can view/change its properties. To view the properties panel, select
"Properties" from the "View" menu.

The following screenshot shows that we are viewing the properties for the IndividualId text box. The "Data"
tab is selected, which shows us the source of the data to populate the text box. The "Formatting" tab
enables us to change the way the field is displayed.
Viewing the Result

Of course, you can always switch back to Form View at any time to see what your form looks like. You can
see by this example that I changed the property of the labels so that their font weight is bold:

You might also like