Making a Grand ExitAfter you finish your work, be sure to exit the database and Access properly. First, close the current database by clicking the Close button ( X ) in the right corner of the Database window's title bar. Or, alternatively, select File, Close.
To close Access, click the
Close
button in the
right corner of the application window's title bar. Or, select
File, Exit
. It's all right to close Access with an
open database using one of these methodsAccess will close both the
Caution
|
Chapter 3. Exploring the Database WindowIn this chapter
In Chapter 2, "Take a Quick Tour of Access," you learned about
some of the Access
|
What's in the Database Window?
The
Note
Depending on how your computer is configured, you might need to
respond to two separate warnings after selecting the first database
to load. First, you may see a warning that states "Security
Warning: Unsafe expressions are not blocked." This is Access's way
of informing you that there's a potential bug in the Microsoft Jet
database engine, which is used by Access. To be safe from this bug,
you need to install Service Pack 7 (or a later version, when one
comes out) for Jet 4.0. The easiest way to do this is to visit the
Installing SP7 will keep this warning from appearing in the
future. In the mean time, it's safe to click the Yes button to open
the Northwind sample database, because it comes from a trusted
source. But beware of blindly clicking Yes for every database,
After you deal with the first security warning (if it appears),
you'll get a second security warning. This one will tell you "This
file may not be safe if it contains code that was intended to harm
your computer." The issue here is that Access databases can contain
code, and if a nasty person wrote that code, it could be designed
to destroy or damage the files on your computer. Because the
Northwind file is from a trusted source, it's safe to click Open
here. But once again, be cautious: A database that was just
When the Northwind database loads, you are presented with the
splash screen shown in Figure 3.1. If you've seen this screen often
enough, you can check the check box to make it go away. For now,
just click the
OK
button and it will
Figure 3.1. The Northwind database splash screen.
After you dismiss the splash screen, your Access window contains two things, as shown in Figure 3.2. In the front is the Main Switchboard, which is actually an Access form designed to let you perform various functions in this sample database. You'll learn a bit about creating your own switchboard forms in Chapter 15, "Automating Your Database." For now, click the Close button (the X in the upper-right corner of the Main Switchboard) to make it go away. Behind the Main Switchboard is the Database window for this database. Figure 3.2. The Northwind database Main Switchboard and Database window.
Close the Main Switchboard form, and you're left with only the
Database window. But there's a lot going on in this window! Here's
a rundown of the
Caution
Take a moment and click a few of the shortcuts in the Northwind sample database. You'll see that dozens of objects of various types appear in this database. But you'll recall that when you make a new database, you're prompted to save only a single file. What's going on here?
The answer is that Access acts like its own little directory of
files. When you look at an Access database in Windows Explorer, you
can't see into it; it's just one big file. But when you open that
database in Access itself, Access
Before digging into the actual objectsthe tables, queries,
forms,
Figure 3.4. Another view of the Database window in the Northwind database.
Any Access database can contain seven types of objects (although it's possible that any of these types contain no objects):
Next, let's take a quick look at each of these objects. Don't worry, you'll learn about each one in more detail later in the book. For now, just concentrate on getting an overview of what the database contains. Tables
Tables are where the data in a database is actually stored. The
Northwind sample database has tables named Categories, Customers,
The Northwind sample database uses
natural
naming.
That is, objects have
To see the data in a table, just double-click the table in the Database window. For example, Figure 3.5 shows the data in the Orders table (you can see it identified in the caption area of the window displaying the data). Click the Close button at the upper-right of the table window (not the main Access window!) to exit the table when you're done inspecting it. Figure 3.5. A table opened from the Database window.
If you right-click a table item in the Database window, you'll get a shortcut menu of things you can do with the table. This shortcut menu varies depending on which type of object you've clicked, but some choices are the same. Right-click and select Properties to open the Properties dialog box for the table. Here you can type a description that will appear in the Database window when you're displaying objects in detail view. You'll learn more about tables starting in Chapter 5, "Building Your First Tables." QueriesClick the Queries object type (also known as a shortcut ) button to see a list of queries in the Database window. Of course, you know that in plain English, queries are questions. But in the world of Access, it's easier to think of queries as the answers to questions. For example, the Northwind sample database contains information on a fictional food importing company. The tables contain data on the customers of the company, the products the company sells, the employees who sell the products, the orders that customers have placed, and so on. You might think of the tables as a gargantuan filing cabinet filled with sales receipts, employee time cards, and so on. Faced with this mass of data, you might want to ask some questions, such as, "What were the total sales of all our beverage products in 1997?" If you had the sales slips and a calculator, you could work this out. But in Access, you can use a query to find the answer quickly. Locate the query named Category Sales for 1997 in the Database window and double-click it. You'll see the answers in the form of a datasheet (similar to a table), as shown in Figure 3.6. Close the query window by clicking its Close button when you're done inspecting its contents. Figure 3.6. A query opened from the Database window.
Even though queries look like tables when you open them, there's a difference. You enter data into the database through tables, and then retrieve it (possibly rearranged and summarized) through queries. You'll learn more about queries starting in Chapter 7, "Retrieving Data with Queries." FormsClick the Forms shortcut to see a list of forms in the Database window. Real life is full of forms: tax forms, medical insurance forms, rebate forms, and so on. Access forms share some of this fill-in-the-blank aspect, but they also offer additional flexibility that you'll never find in a paper form. Just like tables and queries, you can open a form by double-clicking it in the Database window. For example, double-click the Employees form in the Database window to open it, as shown in Figure 3.7. Figure 3.7. A form opened from the Database window.
This particular form displays some information about Scott
Bishop, a sales representative for Northwind Traders. You can click
the Company Info and Personal
But this form holds more than just information on Scott Bishop.
The set of controls at the bottom of the form is called the
navigation bar
. These controls let you select
different sets of information to display. Click the right-
You'll learn more about forms in Chapter 8, "Creating and Using Data Entry Forms." ReportsClick the Reports shortcut to see a list of reports in the database. Reports provide a different way to display the data contained in tables. Reports are designed to be attractive when they're actually printed, although you can also view them onscreen. For example, locate and double-click the Summary of Sales by Quarter report. The report opens onscreen, as shown in Figure 3.8. If you move your cursor over the report, the cursor turns into a magnifying glass; click the report to see it with larger type. Figure 3.8. A report opened from the Database window.
If you look at the information in this report, you'll see that
it consists of summary sales and orders
If you have a printer, you can click the Print button on the
Print Preview toolbar to get a paper copy of the report. You'll
find that the onscreen
You'll learn more about reports in Chapter 9, "Printing Information with Reports." PagesClick the Pages shortcut to see a list of pages in the database. Pages are very similar to forms, but there's a twist: They can be displayed in a Web browser as well as in Access itself. Right-click the Employees page in the Database window and select Web Page Preview . This launches your default Web browser (most likely Internet Explorer) and loads the Employees page. As you can see in Figure 3.9, the page is very similar to the Employees form you saw in Figure 3.7. Figure 3.9. A page open in Internet Explorer.
Select File, Close in the Web browser to close the page. Access is the first database to let you so easily move your data to a Web site. You'll learn more about pages in Chapter 10, "Take Your Data to the Web with Pages."
Tip
Macros
Click the
Macros
shortcut to see all the macros in
the database.
Macros
are lists of commands that Access
can save and execute. For example, a macro might open up a
particular form or prompt the
ModulesClick the Modules shortcut to see a list of the modules in the database. Modules are objects that actually contain programming code, written in a language called Visual Basic for Applications (VBA). Modules are designed to give advanced users extra power in customizing a database and its contents. We won't be using modules in this book, although you might occasionally see a database that contains a module. |