cover.eps

Access® 2010 All-in-One For Dummies®

Table of Contents

Introduction

About Access 2010 All-in-One Desk Reference For Dummies

Conventions

Foolish Assumptions

What You Don’t Have to Read

Icons

Organization

Where to Go from Here

Book I : Essential Concepts

Book I : Chapter 1: Introducing Access 2010

Why Use a Database?

Plan, Plan, Plan

The Six Types of Access Objects

Tables for storing your data

Queries for selecting your data

Forms for editing and displaying your data

Reports for printing your data

Macros for saving keystrokes

Modules for writing your own programs

Essential Database Concepts

Book I : Chapter 2: Getting Started, Getting Around

Running Access

Opening a Database

Opening oldies

Saving in a different version

I have that open already!

Creating a sample database from a template

Making Friends with the Access Window

The Ribbon

Minimizing the Ribbon

The Quick Access toolbar

Mission Control: The Navigation Pane

Choosing how database objects are grouped

Choosing size and details for Navigation pane objects

Sorting objects in the Navigation pane

Searching for an object

Viewing Objects in Your Database

Viewing lots of objects at the same time

Switching views

Creating, Deleting, Renaming, Copying, and Printing Objects

Introducing Backstage View

Using Wizards

Getting Help

Saving Time with Keyboard Shortcuts

Book I : Chapter 3: Designing Your Database the Relational Way

What Are Tables, Fields, and Keys?

Data types

Primary key fields for your tables

What Are Relationships?

How relationships work

One-to-many relationships

One-to-one relationships

Many-to-many relationships

Designing a Database

Identifying your data

Eliminating redundant fields

Organizing fields into tables

Add tables for codes and abbreviations

Choosing primary keys for each table

Linking your tables

Refining your links

What’s in a name?

Cleaning up the design

Tips for Choosing Field Types

Choosing between Text and Yes/No fields

Choosing between Text and Memo fields

Choosing between Text and Number (or Currency) fields

Storing pictures and other files

Storing names, money, codes, and other stuff

Storing Single Facts

Creating a Database

Creating a database from scratch

Creating a new database using a template

Book II : Tables for Storing Your Data

Book II : Chapter 1: Creating and Modifying Tables

Deciding How You’ll View Your Tables

Making a Table for Your Data

Starting with an application part

Creating a new table using Datasheet view

Entering data and creating fields

Creating fields

Quick-starting your table

Choosing field names

Changing a field name

Saving your table

Working with a Datasheet Full of Data

Looking at a datasheet

Navigating the data

Adding and Editing Records

Keystrokes that enter data

Editing the data you have

Adding Calculated Fields to Tables

Entering and Editing Hyperlinks

Using the Hyperlink Builder

Using the Attachment Data Type

Deleting records

Entering special characters

Checking Your Spelling

Using AutoCorrect for Faster Data Entry

Formatting a Datasheet

Formatting a field

Changing the font

Taking advantage of Rich Text

Changing gridlines and background color

Rearranging columns in a datasheet

Changing column width

Changing row height

Inserting and deleting columns

Hiding columns

Freezing columns

Changing default formatting for new tables

Taking Advantage of Subdatasheets

Adding a Totals Row to the Datasheet

Book II : Chapter 2: Refining Your Table in Design View

Creating Tables Using Design View

Refining Your Table Using Design View

Using the Caption property

Adding a field

Copying a field

Moving a field

Deleting a field

Choosing a data type

Formatting Fields with Field Properties

Formatting Number and Currency fields

Setting the field size

Formatting Date/Time fields

Formatting Text fields

Defining the Primary Key

Indexing Fields

Printing Table Designs

Book II : Chapter 3: Sorting, Finding, and Filtering Data in a Datasheet

Sorting the Rows of a Datasheet

Finding (and Replacing) Data

Exploring the Find and Replace dialog box and its options

Replacing the data you find

Filtering a Datasheet

Filtering the filtering basics

Using different types of datasheet filters

Filtering by selection

Filtering with common filters

Filtering using criteria on multiple fields

Filtering Using Advanced Filter/Sort

Book II : Chapter 4: Importing and Exporting Data

Cutting, Copying, and Pasting

Using the Office Clipboard

Cutting and pasting small to medium-ish amounts of data

Moving data from Excel to Access

Importing or Linking to Data

Understanding what applications are compatible with Access

Making data available: To link or to import, that is the question

Getting external data

Importing text or spreadsheet data

Importing with the Import Spreadsheet and Link Spreadsheet Wizards

Getting contacts from Outlook into Access

Managing links

Cleaning up your imported data

Running and scheduling saved imports

Getting Data from Another Access Database

Getting Data Out of Access

Collecting Data with Outlook

Using Access Data in a Word Mail Merge

Book II : Chapter 5: Avoiding “Garbage In, Garbage Out”

Finding the Right Tool to Keep Garbage Out

Using Input Masks to Validate and Format Data

Using the Input Mask Wizard

Creating an input mask manually

Creating a Lookup Field

Using the Lookup Wizard

When to use the Allow Multiple Selections option

Modifying the lookup list

Validating Data as It’s Entered

Book II : Chapter 6: Relating Your Tables and Protecting Your Data

Creating Relationships and Protecting Your Data with Referential Integrity

Deciding on the best path to take

Opening the Relationships window

Adding tables to the Relationships window

Setting referential integrity between two tables

Editing and deleting relationships

Referential Integrity with Many-to-Many Relationships

Printing the Relationships Window

Book III : Queries (or Getting Information from Your Data)

Book III : Chapter 1: Creating Select Queries

Types of Queries

Creating a Query in Design View

Creating a Query with the Simple Query Wizard

Viewing Your Query

Understanding Design View

Design view

Working with tables in Design view

Introducing the query design grid

Navigating Design view

Displaying or hiding table names

Tips for Creating a Query

Adding tables to the query

Inserting fields in a design grid

Editing a Query

Sorting a query

Viewing top values

Hiding fields

Changing the format of a query field

Limiting Records with Criteria Expressions

Querying by example

Using dates, times, text, and values in criteria

Using operators in criteria expressions

Using multiple criteria

Using lookup fields in criteria

Queries with multivalue lookup fields

Working with Multiple Related Tables

Joining tables in Design view

Choosing the type of join and setting join properties

Working with Query Datasheets

Using the query datasheet to edit data

AutoLookup queries to fill in data automagically

Saving Queries

Book III : Chapter 2: Letting Queries Do the Math

Doing Math in Queries

Writing Expressions in Access

Using operators in expressions

Field names in expressions

Using functions in expressions

Using the Expression Builder

Getting help with functions

About text in < and > brackets

Nesting functions

Going beyond Basic Arithmetic

Formatting calculated numbers in queries

Avoiding problems with null values

Date and Time Calculations

Using literal dates and times in expressions

Using the Date/Time functions

Manipulating Text with Expressions

Adding spaces to text expressions

Using the Access Text functions

Writing Decision-Making Expressions

Making comparisons in IIf()

Combining comparisons

To tax or not to tax?

Testing for Empty Fields

Sort by name or company

Creating Flexible Parameter Queries

Totals, Subtotals, Averages, and Such

Calculating subtotals in a query

Filtering records based on calculated fields

Book III : Chapter 3: Doing Neat Things with Action Queries and Query Wizards

Creating Action Queries

The dangers of the Run button

Creating action queries safely

Changing Data with Update Queries

Creating New Tables with Make-Table Queries

Moving Data from One Table to Another with Append Queries

Deleting Lots of Records with Delete Queries

Finding Unmatched Records with a Wizard

Finding Duplicate Records

Book III : Chapter 4: Viewing Your Data from All Angles Using Crosstabs and PivotTables

Aggregating Data in a Crosstab Query

Using the Crosstab Query Wizard

Creating a Crosstab query in Design view

Modifying your Crosstab query

Analyzing Data with PivotTables

Creating a blank PivotTable

Displaying data in your PivotTable

Modifying your PivotTable

Working with PivotTable data

Formatting PivotTables

Filtering the PivotTable data

Book IV : Forms for Editing Data

Book IV : Chapter 1: Designing and Using Forms (and Reports)

Forms and Reports Are Secretly Related

Form Basics

What kind of form would you like?

Making and Using a Form

Making the easiest possible form by using the Form button

Viewing a form

Editing data in Form view

Creating Forms with Wizards

Wizard, make me a form!

More super-speedy forms

Modifying Existing Forms (and Reports)

Getting Your Fields Lined Up in Layout View

Using a control layout to rearrange fields

Adding and deleting fields

Making a new form from scratch in Layout view

Adding and deleting rows and columns in the control layout

Controlling your control layouts

Trying out your new, improved form

Configuring the Whole Form or Report

Naming the form

Where records come from

Deciding the order of the records

One record or many?

Some other cool form properties

Applying a theme to a form (or report)

Storing Your Forms and Reports

Form and report management

Importing forms and reports from other databases

Printing forms

Book IV : Chapter 2: Jazzing Up Your Forms (and Reports)

An Efficient Way to Create New Forms

Making All Kinds of Changes in Design View

Changing the layout of an existing form or report

Changing the size of a form

Taking Control of Your Form or Report

Form control types

Making a new control by dragging a field

Making a new control by choosing a control

Setting control properties

Binding a control to data in the record source

Making Controls That Display Text, Numbers, and Dates

Making and editing labels

Adding hyperlink controls

Putting Text and Memo fields in text boxes

Displaying number, currency, and date fields

Breaking Out of the Control Layout

Removing the control layout

Moving or resizing a control

Neatening up your controls

Renaming, Resizing, Deleting, and Copying Controls

Formatting Numbers and Dates

Choosing Fonts, Colors, and Other Decorative Touches

Copying your formatting

Make it red if it’s bad news

Creating Check Boxes for Yes/No Fields

Adding Lines, Boxes, and Backgrounds

Controlling Cursor Movement in Your Form

Book IV : Chapter 3: Creating Smarter Forms

Creating and Configuring Combo and List Boxes

Making combo boxes the really easy way

Running the Combo or List Box Wizard

Changing the properties of a combo or list box

Cool Looks for Yes/No Fields

Creating Option Groups

Creating Command Buttons

Making a Close button

Making a button to display a related form

Making a button to print the current record

Making other cool buttons

Customizing your command button

Making a Find Box

Displaying Attachments

Adding Form Headers and Footers

Creating Tabbed Forms

You Can’t Type That Here!

Making a Main Menu for Your Database

Creating a navigation form

The alternative to navigation forms

Opening a form automatically when the database opens

Book IV : Chapter 4: Doing Calculations in Forms and Subforms (and Reports)

Doing Elementary Calculations

Making a calculated control

Checking your expression

Troubleshooting expressions

Calculating and Formatting Numbers

Calculating and Formatting Dates

Calculating and Formatting Text

Displaying Values That Depend on Conditions

Formatting Calculated Controls

Using a Split Form to Display a Datasheet

Using a Subform to Display Detail Records

Creating a subform

The properties of subform controls

Adding Subtotals and Totals from Subforms

Using aggregate functions

Referring to a control on a subform

Creating the controls to total a subform

Book V : Reporting in Words and Pictures

Book V : Chapter 1: Creating and Spiffing Up Reports

If You Know Forms, You Already Know Reports

Creating Reports Automagically

Making the easiest possible report

Running the Report Wizard

Editing Reports in Layout and Design View

Report Sections and How They Work

Setting report and section properties

Adding page headers, footers, and numbers

Grouping your records

Sorting the records in your report

Calculating group subtotals and report totals

Formatting Tips and Tricks

Copying Forms to Reports

Adding and Formatting Subreports

Making a subreport

Printing information from a subreport on the main report

Displaying Empty or Long Fields

Displaying long text

Displaying fields that may be empty

Viewing Your Reports On-Screen

Book V : Chapter 2: Printing Beautiful Reports

Viewing Your Report

Adjusting the view

Looking at lots of pages

Previewing reports with parameters

Formatting the Page

Selecting a printer

Setting margins, paper size, and paper orientation

Controlling page breaks

Avoiding blank pages

Printing only the data

Printing the Report

Printing on an actual printer

Creating a PDF, XPS, HTML, or other file of your report

Creating Mailing Labels

Running the Label Wizard

Behind the scenes in a mailing-label report

Changing the page setup for labels

Sending a Report to Another Application

Exporting your report to Excel

Exporting your report to Word

E-Mailing your report

Exporting your report in other formats

Automating your exports

Book V : Chapter 3: Creating Charts and Graphs from Your Data

Pull Up a Seat at the Data Bar

Displaying Information with Charts

Creating charts with the Chart Wizard

Making bar charts

Making line and area charts

Making pie and doughnut charts

Making bubble and XY scatter plots

Changing your chart

Formatting charts with colors, legends, and titles

Changing how the data is graphed

Changing which data is charted

Analyzing Your Data Graphically with PivotCharts

Creating PivotCharts

Saving and viewing your PivotChart

Sprucing up your PivotCharts

Book VI : Automation with Macros

Book VI : Chapter 1: Making Macros Do the Work

What Is a Macro?

Creating and Editing Standalone Macros

Naming, saving, and editing macros

Taking action!

Specifying arguments to actions

Moving your actions around

Adding comments

Creating subroutines in macros — submacros

Running Standalone Macros and Submacros

Running a macro when the database opens

Assigning macros to keys

Opening Databases That Contain Macros

Can a macro be a virus?

Putting your database in a safe place

Signing your database

Which actions can you take?

Run This Only If I Say So

If-then macros

If-then-else macros

Book VI : Chapter 2: Making Macros Smarter

Attaching Macros to Tables

Running data macros

Creating a data macro

Cool data macro tricks

Running Macros in Forms

Running a macro when a form event happens

Creating command buttons on forms

Referring to form controls in macros

Printing matching records from a form

Changing the Way Your Form Looks Dynamically

Setting the properties of form controls

Hiding unneeded controls on a form

Setting Up Your Own Main Menu Form

Creating a form that appears when the database opens

Creating command buttons for your main menu form

Using Temporary Variables in Macros

Book VII : Database Administration

Book VII : Chapter 1: Database Housekeeping

Compacting and Repairing Your Database

Making Backups

Converting Databases

Analyzing and Documenting Your Database

Viewing relationships in the Relationships window

Viewing object dependencies

Analyzing database performance

Documenting your database

Loading and Managing Add-Ins

Book VII : Chapter 2: Sharing the Fun: Managing Multiuser Access

Putting Your Database Where They Can See It

Splitting Your Database into a Front End and a Back End

Why split?

Let’s split!

Splitting by hand

Handing out front ends

Relinking your tables

Editing with Multiple Users

Fixing exclusive access

Managing record-locking

Book VII : Chapter 3: Securing Your Access Database

Don’t Forget Basic Windows Security

Controlling What Happens When You Open the Database

Password-Protecting and Encrypting Your Database

Encrypting your database with a password

Opening a password-protected database

Decrypting a database

Locking Up Your Database as an ACCDE File

Creating an ACCDE file

Making updates later

Using the Trust Center

Book VIII : Programming in VBA

Book VIII : Chapter 1: What the Heck Is VBA?

Finding VBA Code

Opening a class module

Creating or opening a standard module

Enabling VBA Code

How code is organized

Using the Visual Basic Editor

Using the Code window

Using the Immediate window

Using the Object Browser

Searching the Object Library

Referring to objects and collections

Choosing object libraries

Closing the Visual Basic Editor

Discovering Code as You Go

Converting macros to VBA code

Copying and pasting code

Book VIII : Chapter 2: Writing Code

How VBA Works

VBA Syntax

Arguing with VBA

Module level versus procedure level

Declaring Module Options

Writing Your Own VBA Procedures

Creating a new standard procedure

Creating a new event procedure

Passing arguments to procedures

Returning a value from a function

Typing and Editing in the Code Window

Shortcut keys used in the Code window

Typing comments

Breaking lines of code

Dealing with compile errors

Testing and Running Your Code

Testing sub procedures

Running sub procedures from Access

Testing function procedures

Using function procedures in Access

Book VIII : Chapter 3: Writing Smarter Code

Creating Variables and Constants

Make me a variable

Scope and lifetime of variables

Defining constants

Organizing variables into arrays

Multidimensional arrays

Naming conventions for variables

Making Decisions in VBA Code

Using If...End If statements

Nesting If...End If statements

Using a Select Case block

Executing the Same Code Repeatedly

Using Do...Loop to create a loop

Using While...Wend to create a loop

Using For...Next to create a loop

Looping through an array

Analyzing each character in a string

Using Custom Functions

Book VIII : Chapter 4: Controlling Forms with VBA

Displaying Custom Messages

Displaying a message box

Responding to what the user clicks

Opening Forms with DoCmd

Umpteen ways to open a form

Closing a form with DoCmd

Changing Form Controls with VBA

Some cool control properties

Controlling properties example

Understanding Objects and Collections

Properties, methods, and events

Referring to objects and collections

An example: Seeing whether a form is open

Looping through collections

Using With...End With

Book VIII : Chapter 5: Using SQL and Recordsets

Recordsets and Object Models

Quick and easy recordsets

ADO recordset properties and methods

Looping through a recordset

Defining a recordset’s cursor type

Field names in recordsets

SQL and Recordsets

Breaking up long SQL statements

Running Action Queries from VBA

Cleaning up connections

Book VIII : Chapter 6: Debugging Your Code

Considering Types of Program Errors

Fixing Compiler Errors

Trapping Runtime Errors

Fixing the runtime error

Preventing the runtime error

Dealing with Logical Errors

Watching things happen

Slowing down procedures

Cleaning up

Book IX : Going Beyond Access

Book IX : Chapter 1: Automation with Other Office Programs

What Is Automation?

Using Object Libraries

Exploring an object library

The Application object

Adding a Contact to Outlook

Merging Data with a Word Document

Creating a Word template

Writing the merge code

Exporting Data to Excel

Book IX : Chapter 2: Using Access as a Front-End to SQL Server

What Is SQL Server?

Using ODBC

Connecting to SQL Server with ODBC

Using linked tables in Access

Maintaining linked tables

Using pass-through queries

Creating an Access Data Project

Designing ADP tables and views

Creating other objects in an ADP

Book IX : Chapter 3: Using Access with SharePoint

What Is SharePoint?

Using a SharePoint List as a Data Source

Creating a new SharePoint list

Linking to an existing SharePoint list

Moving an existing database to SharePoint

Building a Web Database

What is a Web database?

Creating a Web database

Designing Web Databases

Creating a Web table

Creating Web forms and reports

Creating Web macros

Converting client databases to Web databases

Publishing a Web Database

Viewing the results in a browser

When publishing fails

Synchronizing changes

Book IX : Appendix: Installing Microsoft Access

Access® 2010 All-in-One For Dummies®

by Margaret Levine Young, Alison Barrows, and Joseph C. Stockman

WileyTitlePageLogo.eps

About the Authors

Margaret Levine Young has co-authored several dozen computer books about the Internet, UNIX, WordPerfect, Access, and (stab from the past) PC-File and Javelin, including The Internet For Dummies (Wiley) and Windows XP Home Edition: The Complete Reference (Osborne/McGraw-Hill). She met her future husband Jordan in the R.E.S.I.S.T.O.R.S., a high-school computer club before there were high-school computer clubs. Her other passions are her children, music, Unitarian Universalism (www.uua.org), reading, gardening, chickens, and anything to do with cooking or eating.

Alison Barrows has authored or co-authored books on Windows, the Internet, Microsoft Access, WordPerfect, Lotus 1‑2-3, and other topics. In addition to writing books, Alison writes and edits technical documentation and training material. In real life she hangs out with her “guys” — Parker, 6, and Mason, 4, and Evan 2 — and tries to carve out some time to practice yoga. Alison lives with her family in central Massachusetts.

Joe Stockman has been using Microsoft Access since its initial release and has authored or co-authored several books on Access, including Access 2007 Bible and Access 2007 Workbook For Dummies. He’s also developed courseware in Access and VBA and has been on the speaker circuit for Microsoft Access seminars. Joe works as a consultant and software designer for Facilities Survey Inc. in Pittsburgh, PA. He also enjoys music, cooking, and anything else that lets him express his creative side.

Dedication

To my husband Jordan, my kids Meg and Zac, and my supportive friends. (MLY)

To Matt, Parker, Mason, and Evan. (AB)

To Mom, as always. (JCS)

Authors' Acknowledgments

We would like to acknowledge the care of Kyle Looper and Chris Morris, and all the others who shepherded this book through the editing and production process, as well as all the folks listed on the Publisher’s Acknowledgments page who worked on this book. (It takes ALL of these people, not just those of us on the cover.) We’d also like to thank the folks at Microsoft for making Access a wonderful tool to create robust database applications.

Margy thanks her co-workers for their support and for making work fun — the Information Technology team at the UUA: Sean, Matt, Nick, Michelle, Scott, James, Bob, and Mark.

Alison thanks Dotty, Christy, and Matt for taking great care of my guys so I can get work done. Matt (also known as Honey) gets special thanks as my hardware guru.

Joe thanks his mom and dad, for always encouraging but never pushing. Also thanks to my friends and family for their support and understanding of the time it takes to finish this project.

Publisher’s Acknowledgments

We’re proud of this book; please send us your comments through our online registration form located at www.dummies.com/register/.

Some of the people who helped bring this book to market include the following:

Acquisitions, Editorial, and Media Development

Sr. Project Editor: Christopher Morris

Acquisitions Editor: Kyle Looper

Copy Editors: Teresa Artman, Virginia Sanders, Heidi Unger, Brian Walls

Technical Editor: Dan DiNicolo

Editorial Manager: Kevin Kirschner

Editorial Assistant: Amanda Graham

Sr. Editorial Assistant: Cherie Case

Cartoons: Rich Tennant (www.the5thwave.com)

Composition Services

Project Coordinator: Patrick Redmond

Layout and Graphics: Carl Byers, Samantha K. Cherolis, Amy Hassos, Joyce Haughey

Proofreader: Toni Settle

Indexer: Christine Karpeles

Publishing and Editorial for Technology Dummies

Richard Swadley, Vice President and Executive Group Publisher

Andy Cummings, Vice President and Publisher

Mary Bednarek, Executive Acquisitions Director

Mary C. Corder, Editorial Director

Publishing for Consumer Dummies

Diane Graves Steele, Vice President and Publisher

Composition Services

Debbie Stailey, Director of Composition Services

Introduction

Whoa! What happened to menu bars, toolbars, and all that other stuff I used to have? Well, in case you haven’t noticed yet, they’re all gone. Of course, if you never used Access before in your life, you’re starting fresh, so never mind. Whether you never used any version of Microsoft Access, and aren’t even sure what a “version” is, you’ve come to the right book.

The basic idea behind Microsoft Access is to allow individuals and small businesses to manage large amounts of information the way the big corporations do — with relational databases. The difference is that while the big boys spend millions on computer hardware, software, and staffs of nerdy database-administrator types, Access allows you to do it all yourself with a run-of-the-mill PC and a realistic software budget.

Microsoft Access 2010 is the latest-and-greatest version of a long line of Access versions, starting (not surprisingly) with version 1. Not that this is the 2,010th version. Somewhere along the way, Microsoft switched from using sequential numbers for versions to using years — an idea first pioneered by the automotive industry, which sells things like “2010 Ford Mustangs” as opposed to “Mustang Version 9.3s.”

Without going into boring detail about what’s new in Access 2010, you find the usual kind of stuff you find in new versions these days — more power, more flexibility, and more things you can do with it. And of course — along the lines of the Holy Grail of Everything Computerish these days — more taking advantage of everything the Internet has to offer. But the most noticeable change for the Access-experienced is the new look and feel (introduced in the 2007 version) — along with some new ways of doing things.

About Access 2010 All-in-One Desk Reference For Dummies

If you ever have the misfortune of trying to read anything written by one of the aforementioned database-administrator types, you know all about being faced with a decision among the lesser of three evils:

(Option 1) Try to figure it out by guessing-and-poking until you break something.

(Option 2) Part with your hard-earned money to hire someone to do the work for you, only to have someone with poor taste in clothing look at you like you’re an idiot every time you open your mouth.

(Option 3) Forget computers altogether and stick with index cards.

Option 1 is the one most people try first — until they get to the part where they start breaking things, and it starts costing money to get them fixed. Option 2 is too odious to warrant serious consideration. Option 3 just isn’t very realistic nowadays, unless you’re dealing with a tiny amount of personal information. Which leaves a new Option 4 — this book.

The nerds who wrote this book are aware of the fact that nobody on the planet was ever born knowing what any technical term means. In fact, if at all possible, we avoid technical terms like a root canal. But because you are probably faced with technical terms outside this book, we do explain what they mean along the way.

As a rule, big fat computer books aren’t such a great option. For that reason, this isn’t really a big fat computer book. It’s several smaller computer books combined into one. Each small book represents a single topic that you can pursue — or ignore — as your personal tastes and immediate needs dictate.

The idea here is definitely not to try to read the book cover to cover, unless you’re desperately seeking a cure for insomnia. Rather, use the Table of Contents up front, or the Index out back, to look up information when trying to figure it out by guessing just isn’t cutting it.

To prevent this book from topping 3,000 pages, we don’t explain every possible way to do every possible thing in Access. Instead, we chose what we think are the most important database-management tasks, and we show you the best way — at least in our opinions — to do each one.

Conventions

Speaking of insomnia, this book, like most books, follows certain conventions to alert you to different kinds of stuff, as follows:

Boldface: Stuff you actually do while sitting at your computer is shown in boldface, to distinguish it from boring information you probably don’t care about anyway.

Italics: When reality rears its ugly head and we’re forced to use a technical term, we always show that term in italics the first time it’s used. Then we define that term, right there on the spot. Of course, that doesn’t mean you won’t forget the definition two minutes later. But you can easily flip back a few pages and locate the definition amidst all the other words on the page.

Monospace: Monospace text (text in that typeface right back there) represents code, instructions that are written for computers, rather than people, to follow. Computers are so stupid, the term “stupid” is a compliment. Unconscious, non-thinking, non-beings (a.k.a. machines) is more like it. Anyway, when writing instructions for a computer, you really have to spell it out for them, right down to the blank spaces between words. Monospace text makes seeing where you have to put the blank spaces to avoid making Access say “Huh?” easier. (Actually, it can’t even say “Huh?” More likely, it says something really stupid like “Syntax error in something or other.”)

Foolish Assumptions

Despite the fact that the word “Dummies” is clearly emblazoned on this book’s cover and elsewhere, we don’t presume that you’re the junior partner in a ventriloquist act. (The machine you’re working with, yes. You, no.) We do assume that you already know how to do some things, such as turn on your computer and click and double-click things with your mouse. Maybe type with at least one finger.

We also assume you know what those key+key symbols, such as “Ctrl+Esc,” mean. But just in case you don’t, they always mean “Hold down the first key, tap the second key, and then release the first key.” Also, we always use the term “press” when referring to something you do with the keyboard. For example, the instruction “Press Ctrl+Esc” means “Hold down the Ctrl key on your keyboard, tap the Esc key, and then release the Ctrl key.” Click, on the other hand, is something you do with the mouse pointer on your computer screen and the buttons on your mouse.

We also assume (perhaps foolishly) that you know how to work menus. Not that there are many menus in Access. But when there is a menu-like sequence, we use the word “Choose” followed by the commands to choose, separated by an symbol. For example, when we say “Choose StartAll ProgramsMicrosoft OfficeMicrosoft Access Office 2010” that’s short for “Click the Start button, click All Programs on the Start menu that appears, click Microsoft Office on the All Programs menu that appears, and then click Microsoft Office 2010 on the last menu that appears.”

Click, of course, means “rest the mouse pointer on the item, and then tap the left mouse button.” When we tell you to drag something, we mean for you to move your mouse pointer to the item, click, and then hold down the left mouse button while moving the mouse. To drop the item, just release the mouse button after dragging it.

We also show things like Web site URLs (addresses) — those www.whatever.com things you see all over the place. We may even throw in an occasional e-mail address (the somebody@somewhere.com things) without explaining how to use them. Hopefully these assumptions on our part aren’t too foolish. But if we had to explain all that stuff here, there wouldn’t be much space left for talking about Microsoft Access 2010.

What You Don’t Have to Read

Because reading the instructions is something we all do only as a last resort — after guessing and trying to get help on the phone have failed — we try to point out things you really don’t have to read. For example, sidebars (which have a gray background) are little chunks of text with their own titles. If the title looks boring, skip the whole thing.

We also put little icons (pictures) in the left margin to point out text that you can maybe skip over. Or in some cases, really shouldn’t skip over. The icons are pretty self-explanatory. So if you want to skip the next section, that’s fine by us.

Icons

As far as those presumably self-explanatory icons go, here are the explanations you can probably skip over or, at best, glance at:

warning_bomb.eps This is stuff you probably don’t want to ignore. Because if you do, you may regret it. Not that you’re gonna blow up your computer or the Internet or anything if you do. But the consequences may be inconvenient or unpleasant enough to justify spending a few seconds to read what these little notes say.

tip.epsMay be worth reading if you’re looking for a shortcut, or a better way to do things. Not as important as a warning. But probably worth a few seconds of your time.

remember.eps This is either stuff we already told you and you probably forgot, or something that’s at least worth trying to keep in the back of your mind. Even if it’s way back there. Kinda like where you park your car when you go to the mall.

cross-reference.eps This is a reference book, and we certainly don’t expect anyone to read it cover to cover. But sometimes, you just have to know “Subject x” before “Subject y” even comes close to making any sense. So when we’re forced to talk about a “Subject y” kind of thing, we use this icon to point out where “Subject x” is covered.

technicalstuff.eps Stuff that definitely falls into the “insomnia cure” category.

Organization

If you already looked up the Contents at a Glance up near the front of this book, or the Table of Contents right after it, you already know how stuff is organized here. In that case, you may now skip to the “Where to Go from Here” section. But because showing the contents a third time is customary (albeit kinda dumb), without the benefit of page numbers, we follow suit here. This book is actually eight little books, organized as follows:

Book I: Essential Concepts: If this is your first time using Microsoft Access and you really don’t know where else to go, starting here is a good idea. This is the stuff you really need to know to get anything done with Access.

Book II: Tables for Storing Your Data: Everything in Access centers around data (information) stored in tables (not the coffee kind, the columns-and-rows kind). You can’t do much of anything with Access until you have some information stored in tables. This book is a good second stop for you newbies (beginners).

Book III: Queries (or Getting Information from Your Data): Data stored in tables tends to be pretty random and, eventually, pretty plentiful. This book shows you how to pick and choose the information you want to see, and how to organize it in a way that’s more useful, such as alphabetically.

Book IV: Forms for Editing Data: You can definitely get away without making forms in your Access database. But if you get tired of looking at information stored in rows and columns, and you’re up for being creative, forms are definitely worth getting into.

Book V: Reporting in Words and Pictures: Whereas forms are a way to get creative with stuff on your screen, reports are a way to get creative with stuff you print on your computer’s printer. Here’s where you can do things, for example, printing form letters, mailing labels, numbers with totals and subtotals, and stuff like that.

Book VI: Automation with Macros: There’s a technical term for you — macros. Nothing to be intimidated by, though. They’re just a way of writing simple instructions that tell Access how to do something you’re sick of doing yourself. Optional, but more fun than the name implies.

Book VII: Database Administration: Sounds like a real yawn, we know. Sometimes you just gotta do things such as make backup copies of your information, or get other people to help you with boring stuff such as typing information into your tables. This is the place where we cover those kinds of things.

Book VIII: Programming in VBA: For the aspiring mega-nerd, we didn’t let this topic slide. This is where the über-technogeeks make their money by automating Access using a language, rather than macros. Though you can skip it if you have no such aspirations.

Book IX: Going Beyond Access: Kind of like going beyond the final frontier, but with less excitement. This is where you use Access to interact with and move data to and from other programs on your computer — or computers all over the world.

After that comes an appendix on how to install Microsoft Access 2010, in case you haven’t gotten that far. If Access is already on your computer, there’s nothing noteworthy here. If you do need to install Access, and don’t feel like looking there, here’s the condensed version of the appendix: Insert your Microsoft Office or Microsoft Access disc into your computer’s disc drive, wait a few seconds, and then follow the instructions that appear on-screen.

Where to Go from Here

If you patiently read the preceding “Organization” section, you probably know where you need to go next. If not, you beginners should head straight to Book I, Chapter 1 to get your bearings. For the rest of you who already know some of the basics of Access, just pick whatever book or chapter talks about what you’re struggling with right now.

And by the way, thanks for buying (begging, borrowing, or stealing — just kidding with that last one) this book. We hope it serves you well. For those of you who bought an extra, thanks for helping us pay down our credit cards a little.

Book I

Essential Concepts

532188-pp0101.eps

Contents at a Glance

Chapter 1: Introducing Access 2010

Why Use a Database?

Plan, Plan, Plan

The Six Types of Access Objects

Essential Database Concepts

Chapter 2: Getting Started, Getting Around

Running Access

Opening a Database

Making Friends with the Access Window

Mission Control: The Navigation Pane

Viewing Objects in Your Database

Creating, Deleting, Renaming, Copying, and Printing Objects

Introducing Backstage View

Using Wizards

Getting Help

Saving Time with Keyboard Shortcuts

Chapter 3: Designing Your Database the Relational Way

What Are Tables, Fields, and Keys?

What Are Relationships?

Designing a Database

Tips for Choosing Field Types

Storing Single Facts

Creating a Database