You are on page 1of 6

CHAPTER 1: CREATING YOUR FIRST DATABASE 25

STARTING A
DATABASE
Modules are les that contain Visual Basic code. You can use this code to do
just about anythingfrom updating 10,000 records to ring of an email.
Access gurus refer to all these database ingredients as objects because you manage
them all in essentially the same way. If you want to use a particular object, you add
it to your database, give it a name, and then ne-tune it. Later on, you can view your
objects, rename them, or delete ones you don't want anymore.
NOTE
Designing a database is the process of adding and configuring database objects. For those keeping
score, an Access database can hold up to 32,768 separate objects.
In this chapter, you'll consider only the most fundamental type of database object:
tables. But rst, you need to create a blank database you can work with.
Starting a Database
When you start Access, you begin at the welcome page. From there, you're just a
few clicks away from generating a database of your very own.
In this chapter, you'll slap together a fairly straightforward database. This example
is designed to store a list of prized bobblehead dolls. (For those not in the know, a
bobblehead doll is a toy gure with an oversized head on a spring, hence the sig-
nature "bobbling" motion. Bobblehead dolls usually resemble a famous celebrity,
politician, athlete, or ctional character.)
TIP
You can get the Bobblehead database, and all the databases in this book, on the Missing CD page at
www.missingmanuals.com/cds/access2013mm.
Here's how to create a blank new database:
1. Start Access.
Access starts you out with what is, for Microsoft, a remarkably streamlined win-
dow (Figure 1-1). Here you can create a new database or open an existing one.
ACCESS 2013: THE MISSING MANUAL 26
STARTING A
DATABASE
FIGURE 1-1
When you start Access,
you see this two-part
welcome page. On the left
is a list of recently opened
databases (if you have
any). On the right is a
list of templates that you
can use to create a new
database.
TIP
If you already have Access open and you've been working with another database, just choose FileNew
to create a new database. You'll get the same list of templates as when you first launch Access.
2. Click the "Blank desktop database" template.
When you choose to create a blank database, that's exactly what you geta
new, empty database le with no tables or other database objects. Starting
from scratch is the best way to learn about Access. It's also the favorite choice
of database experts, who prefer to create everything themselves so it's exactly
the way they like it.
Other templates let you create databases that are precongured for specic
scenarios and certain types of data. The box on page 27 has more information.
The cool-sounding "Custom web app" template is a special case. It lets you
create a web-enabled database that runs on SharePoint. You'll explore this new
feature (and its limitations), in Chapter 20.
CHAPTER 1: CREATING YOUR FIRST DATABASE 27
STARTING A
DATABASE
No matter which template you click, Access pops open a new window that lets
you choose a name and location for your new database (Figure 1-2).
UP TO SPEED
Templates: One Size Fits Some
The example in this section shows you how to create a blank
database. However, if you scroll down (on the right side of the
Figure 1-1), you'll find a long list of prebuilt databases, which
are known as templates. Templates aim to save you the work
of creating a new database and let you jump straight to the
fine-tuning and data-entry stage.
As you might expect, there's a price to be paid for this con-
venience. Even if you find a template that stores the type of
information you want to track, you might find that the pre-
defined structure isn't quite right. For example, if you choose
to use the Home Inventory template to track all the stuff in your
basement, you might find that it's missing some information
you want to use (like the projected resale value of your stuff
on eBay) and includes other details you don't care about (like
the date you acquired each item). To make this template work,
you'll need to change the design of your table, which involves
the same Access know-how as creating one.
In this book, you'll learn how to build your own databases from
the ground up and customize every square inch of them. Once
you're an Access master, you can spend many fun hours playing
with the prebuilt templates and adapting them to suit your
needs. To give it a whirl, click one of a dozen or so templates
that are shown in the main Access window. Or, even better,
hunt for more by using the Search box at the top of the Access
window, which scans through the thousands of templates
available on Microsoft's Office website.
3. Type a le name for the database you're about to create.
Access stores all the information for a database in a single le with the extension
.accdb (which stands for "Access database"). Don't stick with the name Access
picks automatically (like "Database1.accdb"). Instead, pick something more
descriptive. In this example, Bobblehead.accdb does the trick.
As with any other le, Access les can contain a combination of letters, spaces,
numbers, parentheses, hyphens (-), and the underscore (_). It's generally safest
to stay away from other special characters, some of which aren't allowed.
ACCESS 2013: THE MISSING MANUAL 28
STARTING A
DATABASE
FIGURE 1-2
This database will be
named Bobblehead.accdb.
As you can see by the file
path below the File Name
box, it will be saved
in the folder C:\Users\
matthew\Documents. You
can edit the file name by
typing in the File Name
box, and you can browse
to a different folder by
clicking the folder icon.
NOTE
Depending on your computer settings, Windows may hide file extensions. Instead of seeing the Access
database file MyScandalousWedding.accdb in file-browsing tools like Windows Explorer, you may just see the
name MyScandalousWedding (without the .accdb part on the end). In this case, you can still tell the file type by
looking at the icon. If you see a small Access icon next to the file name, that's your signal that you're looking at
an Access database.
4. Choose the folder where you want to store your database.
Like all Ofce programs, Access assumes you want to store every le you create
in your personal Documents folder. If this isn't what you want, click the folder
icon to show the File New Database window, browse to the folder you want
(Figure 1-3), and then click OK.
CHAPTER 1: CREATING YOUR FIRST DATABASE 29
STARTING A
DATABASE
FIGURE 1-3
The File New Database
window lets you choose
where you'll store a new
Access database file. It
also gives you the option
to create your database in
the format used by older
versions of Access (.mdb),
instead of the more
modern format used by
Access 2007, Access 2010,
and Access 2013 (.accdb).
To change the format,
simply choose the corre-
sponding Access version
from the "Save as type"
list, as shown here.
5. Click the big Create button (under the File Name box).
Access creates your database le and then shows a datasheet where you can
get to work creating your rst table.
POWER USERS' CLINIC
Telling Access Where to Store Your Databases
Access always assumes you want to store databases in your
Documents folder. And though you can choose a different
location every time you save or open a database, if there's
another folder you need to visit frequently, then it makes
sense to make that your standard database storage location.
You can configure Access to use this folder with just a few steps:
1. Make sure you've opened a database or created a new
one. You can't make this change from the window you
see when you first start Access.
2. Choose Fi l eOpti ons. The Access Opti ons wi ndow
appears.
3. In the list on the left, choose General.
4. In the page on the right, look for the "Creating databases"
heading. Underneath, you'll find a "Default database
folder" text box. Type the path to the folder you want to
use (like C:\MyDatabases), or click Browse to navigate to it.
When you're finished, click OK to save your changes.
Once you create or open a database, the Access window changes quite a bit. An
impressive-looking toolbar (the ribbon) appears at the top of your screen, and a
ACCESS 2013: THE MISSING MANUAL 30
BUILDING YOUR
FIRST TABLE
Navigation Pane shows up on the left. You're now in the control center where you'll
perform all your database tasks (Figure 1-4).
FIGURE 1-4
The navigation pane on
the left lets you see dif-
ferent items (or objects)
in your database. You
can use the navigation
pane to jump from a list
of products to a list of
customers and back again.
The ribbon along the top
groups together every
Access command. This
ribbon is the mission con-
trol that lets you perform
various tasks with your
database. The document
window in the middle
takes up the rest of the
window. This window is
where you'll do your work,
such as designing tables
and entering data.
If you haven't used the ribbon before (either in Access or in another Ofce program),
the Introduction covers the basics of how the ribbon works. Otherwise, carry on to
the next section, where you'll learn how to add a table to your brand-new, empty
database.
Building Your First Table
Tables are information containers. Every database needs at least one tablewithout
it, you can't store any data. In a simple database, like the Bobblehead database, a
single table (which we'll call Dolls) is enough. But if you nd yourself wanting to store
several lists of related information, you need more than one table. In the database
BigBudgetWedding.accdb, you may want to keep track of the guests that you invited
to your wedding, the gifts that you requested, and the loot that you actually received.
In Chapter 5, you'll see plenty of examples of databases that use multiple tables.
Figure 1-5 shows a sample table.

You might also like