Table of Contents

Introduction

Part I The Basics of Access Development

1 Access as a Development Tool

Why This Chapter Is Important

What Types of Applications Can You Develop in Access?

Access as a Development Platform for Personal Applications

Access as a Development Platform for Small Business Applications

Access as a Development Platform for Departmental Applications

Access as a Development Platform for Corporationwide Applications

Access as a Front End for Enterprisewide Client/Server Applications

Access as a Development Platform for Intranet/Internet Applications

Access as a Scalable Product

What Exactly Is a Database?

Getting to Know the Database Objects

Tables: A Repository for Your Data

Queries: Stored Questions or Actions You Apply to Your Data

Forms: A Means of Displaying, Modifying, and Adding Data

Reports: Turning Data into Information

Macros: A Means of Automating Your System

Modules: The Foundation to the Application Development Process

Object Naming Conventions

Hardware Requirements

What Hardware Does Microsoft Office Access 2007 Require?

How Do I Get Started Developing an Access Application?

Task Analysis

Data Analysis and Design

Prototyping

Testing

Implementation

Maintenance

What’s New in Access 2007?

What’s New in the User Interface?

Getting to Know the Ribbon

Getting to Know the Navigation Pane

Working with Tabbed Documents

Exploring the New Status Bar

Working with the Mini Toolbar

What’s New with Forms?

What’s New with Reports?

The Exciting World of Pivot Tables and Pivot Charts

Other New Features Found in Access 2007

What Happened to Replication?

What Happened to ADP Files?

Additional Tips and Tricks

Advanced Navigation Pane Techniques

Creating Multi-valued Fields

Practical Examples: The Application Design for a Computer Consulting Firm

Summary

2 What Every Developer Needs to Know About Databases and Tables

Why This Chapter Is Important

Creating a New Database

Creating a Database Using a Template

Creating a Database from Scratch

Building a New Table

Designing a Table from Scratch

Selecting the Appropriate Field Type for Your Data

Text Fields: The Most Common Field Type

Memo Fields: For Those Long Notes and Comments

Number Fields: For When You Need to Calculate++

Date/Time Fields: Tracking When Things Happened

Currency Fields: Storing Money

AutoNumber Fields: For Unique Record Identifiers

Yes/No Fields: When One of Two Answers Is Correct

OLE Object Fields: The Place to Store Just About Anything

Attachment Fields: Storing Several Files in a Single Field

Hyperlink Fields: Your Link to the Internet

Working with Field Properties

Field Size: Limiting What’s Entered into a Field

Format: Determining How Data Is Displayed

Input Mask: Determining What Data Goes into a Field

Caption: A Great Timesaver

Default Value: Saving Data Entry Time

Validation Rule: Controlling What the User Enters in a Field

Validation Text: Providing Error Messages to the User

Required: Making the User Enter a Value

Allow Zero Length: Accommodating Situations with Nonexistent Data

Indexed: Speeding Up Searches

Unicode Compression: Compressing Your Data

Using the All-Important Primary Key

Working with the Lookup Feature

Working with Table Properties

Using Indexes to Improve Performance

Using Access Tables with the Internet

The Hyperlink Field Type

Saving Table Data as HTML

Saving Table Data as XML

Viewing Object Dependencies

Examining Database Specifications and Limitations

Examining Table Specifications and Limitations

Practical Examples: Designing the Tables Needed for a Computer Consulting Firm’s Time and Billing Application

Summary

3 Relationships: Your Key to Data Integrity

Why This Chapter Is Important

Introduction to Relational Database Design

The History of Relational Database Design

Goals of Relational Database Design

Rules of Relational Database Design

Normalization and Normal Forms

Denormalization—Purposely Violating the Rules

Integrity Rules

Database-Specific Rules

Examining the Types of Relationships

Establishing Relationships in Access

Establishing a Relationship Between Two Tables

Looking at Guidelines for Establishing Relationships

Modifying an Existing Relationship

Establishing Referential Integrity

Cascade Update Related Fields

Cascade Delete Related Records

Looking at the Benefits of Relationships

Examining Indexes and Relationships

Practical Examples: Establishing the Relationships Between the Tables Included in the Time and Billing Database

Summary

4 What Every Developer Needs to Know About Query Basics

Why This Chapter Is Important

What Is a Query, and When Should You Use One?

Everything You Need to Know About Query Basics

Adding Tables to Your Query

Adding Fields to Your Query

Removing a Field from the Query Design Grid

Inserting a Field After the Query Is Built

Moving a Field to a Different Location on the Query Design Grid

Saving and Naming Your Query

Ordering Your Query Result

Sorting by More Than One Field

Refining Your Query with Criteria

Working with Dates in Criteria

Understanding How You Can Update Query Results

Building Queries Based on Multiple Tables

Pitfalls of Multitable Queries

Row Fix-Up in Multitable Queries

Creating Calculated Fields

Getting Help from the Expression Builder

Summarizing Data with Totals Queries

Excluding Fields from the Output

Understanding Nulls and Query Results

Refining Your Queries with Field, Field List, and Query Properties

Field Properties: Changing the Behavior of a Field

Field List Properties: Changing the Properties of the Field List

Query Properties: Changing the Behavior of the Overall Query

Building Parameter Queries When You Don’t Know the Criteria at Design Time

Adding Smart Tags to Your Queries

Adding a Smart Tag to a Query

Using a Smart Tag

Creating a Pivot Table or Pivot Chart from a Query

Creating the Query to Display in PivotTable or PivotChart View

Displaying the Query in PivotTable View

Displaying Summarized Data

Filtering Pivot Table Data

Using Drill-Down

Exchanging Axes

Switching to PivotChart View

Understanding Query Specifications and Limitations

Practical Examples: Building Queries Needed by the Time and Billing Application for a Computer Consulting Firm

Summary

5 What Every Developer Needs to Know About Forms

Why This Chapter Is Important

Understanding the Uses of Forms

Examining the Anatomy of a Form

Creating a New Form

Creating a Form with the Form Wizard

Creating a Form from Design View

Working with the Form Design Window

Understanding and Working with the Form Design Tools

Adding Fields to the Form

Selecting, Moving, Aligning, and Sizing Form Objects

Modifying Object Tab Order

Working in Layout View

Using Stacked and Tabular Layouts

Getting to Know Split Forms

Using Alternating Background Colors for a Form

Selecting the Correct Control for the Job

Labels

Text Boxes

Combo Boxes

List Boxes

Check Boxes

Option and Toggle Buttons

Option Groups

Control Morphing

Morphing a Text Box into a Combo Box

Morphing a Combo Box into a List Box

Conditional Formatting

Determining Which Form Properties Are Available and Why You Should Use Them

Working with the Property Sheet

Working with the Important Form Properties

Determining Which Control Properties Are Available and Why You Should Use Them

Format Properties of a Control

Data Properties of a Control

Other Properties of a Control

Understanding Bound, Unbound, and Calculated Controls

Using Expressions to Enhance Your Forms

Using the Command Button Wizards: Programming Without Typing

Building Forms Based on More Than One Table

Creating One-to-Many Forms

Working with Subforms

Basing Forms on Queries: The Why and How

Embedding SQL Statements Versus Stored Queries

Connecting Access Forms and the Internet

Adding a Hyperlink to a Form

Saving a Form as HTML

Saving a Form as XML

Adding Smart Tags to Your Forms

Adding a Smart Tag to a Form

Using a Smart Tag

Creating a Pivot Table or Pivot Chart from a Form

Creating the Form to Display in PivotTable or PivotChart View

Displaying the Form in PivotTable View

Displaying Summarized Data

Filtering Pivot Table Data

Using Drill-Down

Exchanging Axes

Switching to PivotChart View

Examining Form Specifications and Limitations

Practical Examples: Designing Forms for Your Application

Designing the Clients Form

Designing the Projects Form

Adding a Command Button That Links the Clients and Projects Forms

Summary

6 What Every Developer Needs to Know About Reports

Why This Chapter Is Important

Examining Types of Reports Available

Detail Reports

Summary Reports

Cross-Tabulation Reports

Reports with Graphics and Charts

Reports with Forms

Reports with Labels

Understanding the Anatomy of a Report

Creating a New Report

Creating a Report with the Report Wizard

Creating a Report from Design View

Working with the Report Design Window

Understanding the Report Design Tools

Adding Fields to the Report

Selecting, Moving, Aligning, and Sizing Report Objects

Selecting the Correct Control for the Job

Labels

Text Boxes

Lines

Rectangles

Bound Object Frames

Unbound Object Frames

Image Controls

Other Controls

What Report Properties Are Available, and Why Should You Use Them?

Working with the Property Sheet

The Report’s Format Properties

The Report’s Data Properties

The Other Report Properties

What Control Properties Are Available, and Why Should ou Use Them?

The Control’s Format Properties

The Control’s Data Properties

The Other Control Properties

Inserting Page Breaks

Using Unbound, Bound, and Calculated Controls

Using Expressions to Enhance Your Reports

Building Reports Based on More Than One Table

Creating One-to-Many Reports

Working with Subreports

Working with Sorting and Grouping

Adding Sorting or Grouping

What Are Group Header and Footer Properties, and Why Should You Use Them?

Improving Performance and Reusability by Basing Reports on Stored Queries or Embedded SQL Statements

Using Access Reports and the Internet

Adding a Hyperlink to a Report

Saving a Report as HTML

Saving a Report as XML

Understanding Report Specifications and Limitations

Practical Examples: Building Reports Needed for Your Application

Designing the rptClientListing Report

Designing the rptTimeSheet Report

Summary

7 What Are Macros, and When Do You Need Them?

Why This Chapter Is Important

Learning the Basics of Creating and Running a Macro

Macro Actions

Action Arguments

Macro Names

Macro Conditions

Running an Access Macro

Running a Macro from the Macro Design Window

Running a Macro from the Macros Group of the Navigation Pane

Triggering a Macro from a Form or Report Event

Modifying an Existing Macro

Inserting New Macro Actions

Deleting Macro Actions

Moving Macro Actions

Copying Macro Actions

Creating an Embedded Macro

What New Features Are Available in Macros?

Documenting Your Macro: Adding Comments

Testing a Macro

Determining When You Should Use Macros and When You Shouldn’t

Converting a Macro to VBA Code

Creating an AutoExec Macro

Using the DoCmd Object

Practical Examples: Adding an AutoExec Macro to the Time and Billing Application

Summary

8 VBA: An Introduction

Why This Chapter Is Important

VBA Explained

What Are Access Class Modules, Standard Modules, Form Modules, and Report Modules?

Where Is VBA Code Written?

The Anatomy of a Module

Option Explicit

Creating Event Procedures

Creating Functions and Subroutines

Calling Event and User-Defined Procedures

Scope and Lifetime of Procedures

Working with Variables

Declaring Variables

VBA Data Types

Scope and Lifetime of Variables: Exposing Your Variablesas Little as Possible

Adding Comments to Your Code

Using the Line Continuation Character

Using the VBA Control Structures

If...Then...Else

The Immediate If (IIf)

The Conditional If: Conditional Compilation

Select Case

Looping

For...Next

With...End With

For Each...Next

Passing Parameters and Returning Values

Executing Procedures from the Module Window

The DoCmd Object: Performing Macro Actions

Working with Built-In Functions

Built-In Functions

Functions Made Easy with the Object Browser

Working with Constants

Working with Symbolic Constants

Working with Intrinsic Constants

Working with the Visual Basic Editor Tools

List Properties and Methods

List Constants

Quick Info

Parameter Info

Complete Word

Definition

Mysteries of the Coding Environment Solved

The Project Window

The Properties Window

The View Microsoft Access Tool

Find and Replace

Help

Splitting the Code Window

Using Bookmarks to Save Your Place

Customizing the VBE

Coding Options—The Editor Tab

Code Color, Fonts, and Sizes—The Editor Format Tab

General Options—The General Tab

Docking Options—The Docking Tab

Practical Examples: Using Event Routines, User-Defined Functions, and Subroutines

Summary

9 Objects, Properties, Methods, and Events Explained

Why This Chapter Is Important

Understanding Objects, Properties, Events, and Methods

What Exactly Are Objects?

What Exactly Are Properties?

What Exactly Are Events?

What Exactly Are Methods?

Using the Object Browser to Learn About Access’s Objects

How to Use the Object Browser

Pasting Code Templates into a Procedure

Referring to Objects

Working with Properties and Methods

Telling the Difference Between Properties and Methods

Using a Bang Versus a Period

Default Properties

Declaring and Assigning Object Variables

Object Variables Versus Regular Variables

Generic Versus Specific Object Variables

Cleaning Up After Yourself

Understanding the Differences Between Objects and Collections

Manipulating a Single Object

Manipulating a Collection of Objects

Passing Objects to Subroutines and Functions

Determining the Type of a Control

Using Special Properties That Refer to Objects

Understanding Access’s Object Model

The Application Object

The Forms Collection

The Reports Collection

The Modules Collection

The CurrentProject Object

The CurrentData Object

The CodeProject Object

The CodeData Object

The Screen Object

The DoCmd Object

Taking Advantage of Additional Useful Properties

Practical Examples: Working with Objects

Enabling and Disabling Command Buttons

Summary

10 Advanced Form Techniques

Why This Chapter Is Important

What Are the Form Events, and When Do You Use Them?

Current

BeforeInsert

AfterInsert

BeforeUpdate

AfterUpdate

Dirty

Undo

Delete

BeforeDelConfirm

AfterDelConfirm

Open

Load

Resize

Unload

Close

Activate

Deactivate

GotFocus

LostFocus

Click

DblClick

MouseDown

MouseMove

MouseUp

KeyDown

KeyUp

KeyPress

Error

Filter

ApplyFilter

Timer

Understanding the Sequence of Form Events

What Are the Section and Control Events, and When Do You Use Them?

BeforeUpdate

AfterUpdate

Updated

Change

NotInList

Enter

Exit

GotFocus

LostFocus

Click

DblClick

MouseDown

MouseMove

MouseUp

KeyDown

KeyUp

KeyPress

Understanding the Sequence of Control Events

Referring to Me

What Types of Forms Can I Create, and When Are They Appropriate?

Single Forms: Viewing One Record at a Time

Continuous Forms: Viewing Multiple Records at a Time

Multipage Forms: Finding Solutions When Everything Doesn’t Fit on One Screen

Tabbed Forms: Conserving Screen Real Estate

Switchboard Forms: Controlling Your Application

Splash Screen Forms: Creating a Professional Opening to Your Application

Dialog Forms: Gathering Information

Using Built-In Dialog Boxes

Message Boxes

Input Boxes

The FileDialog Object

Taking Advantage of Built-In, Form-Filtering Features

Including Objects from Other Applications: Linking Versus Embedding

Bound OLE Objects

Unbound OLE Objects

Using OpenArgs

Switching a Form’s RecordSource

Learning Power Combo Box and List Box Techniques

Handling the NotInList Event

Working with a Pop-Up Form

Adding Items to a Combo Box or List Box at Runtime

Handling Multiple Selections in a List Box

Learning Power Subform Techniques

Referring to Subform Controls

Using Automatic Error Checking

Viewing Object Dependencies

Using AutoCorrect Options

Propagating Field Properties

Synchronizing a Form with Its Underlying Recordset

Creating Custom Properties and Methods

Creating Custom Properties

Creating Custom Methods

Practical Examples: Applying Advanced Techniques to Your Application

Getting Things Going with a Startup Form

Building a Splash Screen

Summary

11 Advanced Report Techniques

Why This Chapter Is Important

Events Available for Reports and When to Use Them

The Open Event

The Close Event

The NoData Event

The Page Event

The Error Event

Order of Events for Reports

Events Available for Report Sections and When to Use Them

The Format Event

The Print Event

The Retreat Event

Order of Section Events

Programmatically Manipulating Report Sections

Taking Advantage of Special Report Properties

MoveLayout

NextRecord

PrintSection

Interaction of MoveLayout, NextRecord, and PrintSection

FormatCount

PrintCount

HasContinued

WillContinue

Controlling the Printer

The Printer Object

The Printers Collection

Using Automatic Error Checking

Propagating Field Properties

Incorporating Practical Applications of Report Events and Properties

Changing a Report’s RecordSource

Working with Report Filters

Working with the Report Sort Order

Using the Same Report to Display Summary, Detail, or Both

Numbering Report Items

Printing Multiple Labels

Determining Where a Label Prints

Building a Report from a Crosstab Query

Printing the First and Last Page Entries in the Page Header

Creating a Multifact Crosstab Report

Practical Examples: Practicing What You Learned

Summary

12 Advanced Query Techniques

Why This Chapter Is Important

Using Action Queries

Update Queries

Delete Queries

Append Queries

Make Table Queries

Using Action Queries Versus Processing Records with Code

Viewing Special Query Properties

Unique Values Property

Unique Records Property

Top Values Property

Optimizing Queries

Understanding the Query Compilation Process

Analyzing a Query’s Performance

Steps You Can Take to Improve a Query’s Performance

Rushmore Technology

Using Crosstab Queries

Creating a Crosstab Query with the Crosstab Query Wizard

Creating a Crosstab Query Without the Crosstab Query Wizard

Creating Fixed Column Headings

Important Notes About Crosstab Queries

Establishing Outer Joins

Establishing Self-Joins

Understanding SQL

What Is SQL, and Where Did It Come From?

What Do You Need to Know About SQL?

SQL Syntax

The SELECT Statement

Applying What You Have Learned

Building Union Queries

The ALL Keyword

Sorting the Query Results

Using the Graphical QBE to Create a Union Query

Important Notes about Union Queries

Using Pass-Through Queries

Examining the Propagation of Nulls and Query Results

Running Subqueries

Using SQL to Update Data

The UPDATE Statement

The DELETE Statement

The INSERT INTO Statement

The SELECT INTO Statement

Using SQL for Data Definition

The CREATE TABLE Statement

The CREATE INDEX Statement

The ALTER TABLE Statement

The DROP INDEX Statement

The DROP TABLE Statement

Using the Result of a Function as the Criteria for a Query

Passing Parameter Query Values from a Form

Understanding Jet 4.0 ANSI-92 Extensions

Table Extensions

View and Stored Procedures Extensions

Transaction Extensions

Practical Examples: Applying These Techniques in Your Application

Archiving Payments

Showing All Payments

Creating a State Table

Summary

13 Advanced VBA Techniques

Why This Chapter Is Important

What Are User-Defined Types, and Why Would You Use Them?

Declaring a User-Defined Type

Creating a Type Variable

Storing Information from a Record in a Form into a Type Variable

Retrieving Information from the Elements of a Type Variable

Working with Constants

Defining Your Own Constants

Working with Intrinsic Constants

Working with Arrays

Declaring and Working with Fixed Arrays

Declaring and Working with Dynamic Arrays

Passing Arrays as Parameters

Understanding Advanced Function Techniques

Passing by Reference Versus Passing by Value

Optional Parameters: Building Flexibility into Functions

Named Parameters: Eliminate the Need to Count Commas

Recursive Procedures

Working with Empty and Null

Working with Empty

Working with Null

Creating and Working with Custom Collections

Creating a Custom Collection

Adding Items to a Custom Collection

Accessing an Item in a Custom Collection

Removing Items from a Custom Collection

Iterating Through the Elements of a Custom Collection

Handling Files with Low-Level File Handling

Understanding and Effectively Using Compilation Options

Compile on Demand

Importing and Exporting Code Modules

Working with Project Properties

Practical Examples: Putting Advanced Techniques to Use

Examples of Null, the DoCmd Object, and Intrinsic Constants

An Example of Using a Type Structure

Summary

14 Exploiting the Power of Class Modules

Why This Chapter Is Important

Object Orientation—An Introduction

Creating and Using a Class Module

Adding Properties

Adding Methods

Instantiating and Using the Class

Property Let and Get—Adding Properties the Right Way

Setting Values with Property Set

Creating Multiple Class Instances

Adding Code to the Initialize and Terminate Events

Initialize

Terminate

Working with Enumerated Types

Building Hierarchies of Classes

Adding a Parent Property to Classes

Using the Implements Keyword

Working with Custom Collections

Creating a Custom Collection

Adding Items to a Custom Collection

Looping Through the Elements of a Custom Collection

Referencing Items in a Custom Collection

Removing Items from a Custom Collection

Adding Your Own Events

Practical Examples: Using Class Modules

The FileInformation Class

The Data Access Class

The SystemInformation Class

Summary

15 What Are ActiveX Data Objects, and Why Are They Important?

Why This Chapter Is Important

Examining the ADO Model

The Connection Object

The Recordset Object

The Command Object

Understanding ADO Recordset Types

The CursorType Parameter

The LockType Parameter

The Options Parameter

Consistent Versus Inconsistent Updates

Selecting a Cursor Location

Working with the Supports Method

Working with ADO Recordset Properties and Methods

Examining Record-Movement Methods

Detecting the Limits of a Recordset

Counting the Number of Records in a Recordset

Sorting, Filtering, and Finding Records

Using the AbsolutePosition Property

Using the Bookmark Property

Running Parameter Queries

Refreshing Recordset Data

Working with Persisting Recordsets

Modifying Table Data Using ADO Code

Changing Record Data One Record at a Time

Performing Batch Updates

Making Bulk Changes

Deleting an Existing Record

Adding a New Record

Creating and Modifying Database Objects Using ADO Code

Adding a Table Using Code

Removing a Table Using Code

Establishing Relationships Using Code

Creating a Query Using Code

Practical Examples: Applying These Techniques to Your Application

Using Recordset Methods on a Data-Entry Form

Summary

Part II What to Do When Things Don’t Go as Planned

16 Debugging: Your Key to Successful Development

Why This Chapter Is Important

Avoiding Bugs

Option Explicit

Strong-Typing

Naming Standards

Variable Scoping

Bugs Happen!

Harnessing the Power of the Immediate Window

Testing Values of Variables and Properties

Setting Values of Variables and Properties

Clearing the Immediate Window

Practicing with the Built-In Functions

Executing Subroutines, Functions, and Methods

Printing to the Immediate Window at Runtime

Invoking the Debugger

Using Breakpoints to Troubleshoot

Stepping Through Code

Using Step Into

Executing Until You Reach the Next Breakpoint

Using Step Over

Using Step Out

Setting the Next Statement to Execute

Using the Call Stack Window

Working with the Locals Window

Working with Watch Expressions

Using Auto Data Tips

Using a Quick Watch

Adding a Watch Expression

Editing a Watch Expression

Breaking When an Expression Is True

Breaking When an Expression Changes

Continuing Execution After a Runtime Error

Looking at Gotchas with the Immediate Window

Using Assertions

Debugging Tips

Practical Examples: Debugging Real Applications

Summary

17 Error Handling: Preparing for the Inevitable

Why This Chapter Is Important

Implementing Error Handling

Using On Error Statements

The On Error GoTo Statement

The On Error Resume Next Statement

Using Resume Statements

The Resume Statement

The Resume Next Statement

The Resume <LineLabel> Statement

Clearing an Error

Examining the Cascading Error Effect

Using the Err Object

Raising an Error

Generating an Error on Purpose

Creating User-Defined Errors

Using the Errors Collection

Creating a Generic Error Handler

Logging the Error

Determining the Appropriate Response to an Error

Emailing the Error

Creating an Error Form

Printing the Error Form

Preventing Your Own Error Handling from Being Invoked

Creating a Call Stack

Building a Custom Error Handler Class

Working with Error Events

Creating a List of Error Codes and Descriptions

Practical Examples: Incorporating Error Handling

Summary

18 Optimizing Your Application

Why This Chapter Is Important

Introducing Optimization

Modifying Hardware and Software Configurations

Hardware, Hardware, More Hardware, Please!

Change Access’s Software Settings

What Is the Access Database Engine?

Letting the Performance Analyzer Determine Problem Areas

Designing Tables to Optimize Performance

Why Be Normal?

I Thought You Just Told Me to Normalize

Index, Index, Index!

Select the Correct Data Type

Designing Database Objects to Improve Performance

Optimizing the Performance of Your Queries

Making Coding Changes to Improve Performance

Designing Forms and Reports to Improve Performance

Practical Examples: Improving the Performance of Your Applications

Summary

Part III Developing Multiuser and Enterprise Applications

19 A Strategy to Developing Access Applications

Why This Chapter Is Important

Splitting Databases into Tables and Other Objects

Basing Forms and Reports on Queries or Embedded SQL Statements

Preparing an Application for Distribution

Basing Your Application Around Forms

Adding Startup Options to Your Database

Securing Your Application

Building Error Handling into Your Application

Adding Custom Help

Building Custom Ribbons

Using Access as a Front End

Factors You Need to Worry About When Converting to Client/Server

Benefits and Costs of Client/Server Technology

Your Options When Using Access as a Front End

What Are the Considerations for Migrating to a Client/Server Environment?

Practical Examples: Applying the Strategy to the Computer Consulting Firm Application

Summary

20 Using External Data

Why This Chapter Is Important

Importing, Linking, and Opening Files: When and Why

Selecting an Option

Looking at Supported File Formats

Importing External Data

Using the User Interface

Using Code

Creating a Link to External Data

Using the User Interface

Using Code

Opening an External Table

Providing Connection Information

Opening the Table

Understanding Windows Registry Settings

Using the Jet OLEDB:Link Provider String

Working with Passwords

Refreshing and Removing Links

Updating Links That Have Moved

Deleting Links

Making a Local Table from a Linked Table

Looking at Special Considerations

dBASE

Text Data

Troubleshooting

Connection Problems

Temp Space

Looking at Performance Considerations and Links

Working with HTML Documents

Practical Examples: Working with External Data from Within Your Application

Splitting the Database Using the Database Splitter

Refreshing Links

Summary

21 Access 2007 and SharePoint

Why This Chapter Is Important?

Exporting Selected Data to a SharePoint Site

Moving an Entire Database to a SharePoint Site

Opening Access Forms and Reports from a SharePoint Site

Creating Databases from SharePoint Lists

Taking SharePoint Lists Offline with Access

Summary of Benefits of Working with SharePoint

The Access 2007 (accdb) File Format and SharePoint

Exporting Data to a SharePoint Site

Why Export Data to a SharePoint Site?

How to Export Data to a SharePoint Site

Publishing Data to a SharePoint Site

How the Wizard Moves Data to the SharePoint Site

Opening Access Forms and Reports from a SharePoint Site

Linking to and Importing from SharePoint Lists

Taking SharePoint Lists Offline with Access

Synchronizing Your Changes with SharePoint

Working Online

Discarding Your Changes

Reestablishing Links When a SharePoint Site Has Been Moved

Summary

22 Developing Multiuser and Enterprise Applications

Why This Chapter Is Important

Designing Your Application with Multiuser Issues in Mind

Multiuser Design Strategies

The Basics of Linking to External Data

Understanding Access’s Locking Mechanisms

Understanding the Client/Server Model

Deciding Whether to Use the Client/Server Model

Dealing with a Large Volume of Data

Dealing with a Large Number of Concurrent Users

Demanding Faster Performance

Handling Increased Network Traffic

Implementing Backup and Recovery

Focusing on Security

Sharing Data Among Multiple Front-End Tools

Understanding What It All Means

Understanding the Roles That Access Plays in the Application Design Model

The Front End and Back End as Access ACCDB Files

The Front End as an ACCDB File Using Links to Communicate to a Back End

The Front End Using SQL Pass-Through to Communicate to a Back End

The Front End Executing Procedures Stored on a Back End

The Front End as a Microsoft Access Data Project Communicating Directly to a Back End

Learning the Client/Server Buzzwords

Upsizing: What to Worry About

Indexes

AutoNumber Fields

Default Values

Validation Rules

Relationships

Security

Table and Field Names

Reserved Words

Case Sensitivity

Properties

Visual Basic Code

Proactively Preparing for Upsizing

Using Transaction Processing

Understanding the Benefits of Transaction Processing

Modifying the Default Behavior of Transaction Processing

Implementing Explicit Transaction Processing

Practical Examples: Getting Your Application Ready for an Enterprise Environment

Summary

Part IV Black Belt Programming

23 Working with and Customizing Ribbons

Why This Chapter Is Important

Customizing the Ribbon: An Overview

Showing System Tables

Enabling the Display of System Errors

Creating the USysRibbons Table

Adding Data to the USysRibbons Table

Applying the Custom Ribbon

Applying a Custom Ribbon to the Entire Database

Applying a Custom Ribbon to a Form or Report

Hiding System Objects

Restoring the Ribbon to Its Default Settings

Adding Additional Groups and Controls

Executing a Macro from the Ribbon

Practical Examples: Securing an Access 2007 Database

Summary

24 Automation: Communicating with Other Applications

Why This Chapter Is Important

Defining Some Automation Terms

Declaring an Object Variable to Reference Your Application

Creating an Automation Object

Declaring an Object Variable

Manipulating an Automation Object

Setting and Retrieving Properties

Executing Methods

Using Early Binding Versus Late Binding

CreateObject and GetObject

Controlling Excel from Access

Closing an Excel Automation Object

Creating a Graph from Access

Controlling Word from Access

Using Word to Generate a Mass Mailing

Using Word to Overcome the Limitations of Access as a Report Writer

Controlling PowerPoint from Access

Automating Outlook from Access

Controlling Access from Other Applications

Practical Examples: Using Automation to Extend the Functionality of Your Applications

Summary

25 Exploiting the Powerof the Windows API

Why This Chapter Is Important

Declaring an External Function to the Compiler

Passing Parameters to DLL Functions

Aliasing a Function

Working with Constants and Types

Working with Constants

Working with Types

Calling DLL Functions: Important Issues

Using API Functions

Manipulating the Windows Registry

Getting Information About the Operating Environment

Determining Drive Types and Available Drive Space

Practical Examples: Using Windows API Functions in Your Applications

Summary

26 Creating Your Own Libraries

Why This Chapter Is Important

Preparing a Database to Be a Library

Structuring Code Modules for Optimal Performance

Writing Library Code That Runs

Compiling the Library

Creating a Reference

Creating a Library Reference

Creating a Runtime Reference

Creating an Explicit Reference

Creating a Reference Using VBA Code

Debugging a Library Database

Practical Examples: Building a Library for Your Application

Summary

27 Using Buildersand Wizards

Why This Chapter Is Important

Using Builders

Looking at Design Guidelines

Creating a Builder

Using Wizards

Looking at Design Guidelines

Creating a Wizard

Getting the Wizard Ready to Go

Using Menu Add-Ins

Looking at Design Guidelines

Creating a Menu Add-In

Practical Examples: Designing Your Own Add-Ins

Summary

28 An Introduction to Access and the Internet/Intranet

Why This Chapter Is Important

Saving Database Objects as HTML

Saving Table Data as HTML

Saving Query Results as HTML

Saving Forms as HTML

Saving Reports as HTML

Linking to HTML Files

Importing HTML Files

Saving Database Objects as XML

Importing XML Files

Practical Examples

Summary

Part V Adding Polish to Your Application

29 Documenting Your Application

Why This Chapter Is Important

Preparing Your Application to Be Self-Documenting

Documenting Your Tables

Documenting Your Queries

Documenting Your Forms

Documenting Your Reports

Documenting Your Macros

Documenting Your Modules

Using Database Properties to Document the Overall Database

Using the Database Documenter

Using the Documenter Options

Producing Documentation in Other Formats

Using the Object Dependency Feature

Writing Code to Create Your Own Documentation

Practical Examples: Applying What You Learned

Summary

30 Maintaining Your Application

Why This Chapter Is Important

Compacting Your Database

Using the User Interface

Using a Shortcut

Compacting Whenever a Database Closes

Using the CompactDatabase Method of the JetEngine Object

Using the CompactRepair Method of the Application Object

Backing Up Your Database

Converting an Access Database

Detecting Broken References

Practical Examples: Maintaining Your Application

Summary

31 Database SecurityMade Easy

Why This Chapter Is Important

What’s New in Access 2007 Security?

What Happened to User-Level Security?

Trusting a Database

Trusting a Database for the Current Session

Trusting a Database Permanently

Using a Database Password to Encrypt an Office Access 2007 Database

Removing a Password from a Database

Packaging, Signing, and Distributing an Access Database

Creating a Self-Signed Certificate

Creating a Signed Package

Extracting and Using a Signed Package

Using the Trust Center

Working with the Message Bar

Using Privacy Settings

Working with Access Macros and VBA Code

Working with Trusted Locations

Working with Trusted Publishers

Understanding How Databases Behave When Trusted and Untrusted

Working in Sandbox Mode

Removing User-Level Security

Enabling or Disabling ActiveX Controls

Enabling or Disabling Add-Ins

Adding a Trusted Publisher

Practical Examples: Securing an Access 2007 Database

Summary

Part VI Appendixes

A Naming Conventions

B Table Structures

The tblClients Table

The tblClientAddresses Table

The tblAddressTypes Table

The tblClientPhones Table

The tblPhoneTypes Table

The tblCorrespondence Table

The tblCorrespondenceTypes Table

The tblTerms Table

The tblContactType Table

The tblCompanyInfo Table

The tblEmployees Table

The tblErrorLog Table

The tblErrors Table

The tblExpenseCodes Table

The tblPaymentMethods Table

The tblPayments Table

The tblProjects Table

The tblTimeCardExpenses Table

The tblTimeCardHours Table

The tblTimeCards Table

The tblWorkCodes Table

Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.140.255.27