Table of Contents
Introduction
Part I: Access Building Blocks
Chapter 1: An Introduction to Database Development
The Database Terminology of Access
Databases
Tables
Records and fields
Values
Relational Databases
Access Database Objects
Datasheets
Queries
Data-entry and display forms
Reports
Database objects
A Five-Step Design Method
Step 1: The overall design — from concept to reality
Step 2: Report design
Step 3: Data design
Step 4: Table design
Step 5: Form design
Chapter 2: Getting Started with Access
The Access Welcome Screen
How to Create a Blank Desktop Database
The Access 2013 Interface
The Navigation pane
The Ribbon
The Quick Access toolbar
Part II: Understanding Access Tables
Chapter 3: Creating Access Tables
Table Types
Object tables
Transaction tables
Join tables
Creating a New Table
Designing tables
Using the Design tab
Working with fields
Creating tblCustomers
Using AutoNumber fields
Completing tblCustomers
Changing a Table Design
Inserting a new field
Deleting a field
Changing a field location
Changing a field name
Changing a field size
Handling data conversion issues
Assigning field properties
Understanding tblCustomers Field Properties
Setting the Primary Key
Choosing a primary key
Creating the primary key
Creating composite primary keys
Indexing Access Tables
The importance of indexes
Multiple-field indexes
When to index tables
Printing a Table Design
Saving the Completed Table
Manipulating Tables
Renaming tables
Deleting tables
Copying tables in a database
Copying a table to another database
Adding Records to a Database Table
Understanding Attachment Fields
Chapter 4: Understanding Table Relationships
Building Bulletproof Databases
Data Normalization and Denormalization
First normal form
Second normal form
Third normal form
Denormalization
Table Relationships
Connecting the data
One-to-one
One-to-many
Many-to-many
Integrity Rules
No primary key can contain a null value
All foreign key values must be matched by corresponding primary keys
Keys
Deciding on a primary key
Looking at the benefits of a primary key
Designating a primary key
Creating relationships and enforcing referential integrity
Viewing all relationships
Deleting relationships
Following application-specific integrity rules
Chapter 5: Working with Access Tables
Understanding Datasheets
Looking at the Datasheet Window
Moving within a datasheet
Using the Navigation buttons
Examining the Datasheet Ribbon
Opening a Datasheet
Entering New Data
Saving the record
Understanding automatic data-type validation
Knowing how properties affect data entry
Navigating Records in a Datasheet
Moving between records
Finding a specific value
Changing Values in a Datasheet
Manually replacing an existing value
Changing an existing value
Using the Undo Feature
Copying and Pasting Values
Replacing Values
Adding New Records
Deleting Records
Displaying Records
Changing the field order
Changing the field display width
Changing the record display height
Changing display fonts
Displaying cell gridlines and alternate row colors
Aligning data in columns
Hiding and unhiding columns
Freezing columns
Saving the changed layout
Saving a record
Sorting and Filtering Records in a Datasheet
Sorting your records with QuickSort
Filtering a selection
Filtering by form
Aggregating Data
Printing Records
Printing the datasheet
Using the Print Preview window
Chapter 6: Importing and Exporting Data
How Access Works with External Data
Types of external data
Ways of working with external data
Options for Importing and Exporting
How to Import External Data
Importing from another Access database
Importing from an Excel spreadsheet
Importing a SharePoint list
Importing data from text files
Importing and exporting XML documents
Importing and exporting HTML documents
Importing Access objects other than tables
Importing an Outlook folder
How to Export to External Formats
Exporting objects to other Access databases
Exporting through ODBC drivers
Exporting to Word
Publishing to PDF or XPS
Chapter 7: Linking to External Data
Linking External Data
Identifying linked tables
Limitations of linked data
Linking to other Access database tables
Linking to ODBC data sources
Linking to non-database data
Working with Linked Tables
Setting view properties
Setting relationships
Optimizing linked tables
Deleting a linked table reference
Viewing or changing information for linked tables
Refreshing linked tables
Splitting a Database
The benefits of splitting a database
Knowing where to put which objects
Using the Database Splitter add-in
Part III: Working with Access Queries
Chapter 8: Selecting Data with Queries
Introducing Queries
What queries are
What queries can do
What queries return
Creating a Query
Adding fields to your queries
Running your query
Working with Query Fields
Selecting a field in the QBE grid
Changing field order
Resizing columns in the QBE grid
Removing a field
Inserting a field
Hiding a field
Changing the sort order of a field
Adding Criteria to Your Queries
Understanding selection criteria
Entering simple string criteria
Entering other simple criteria
Printing a Query's Recordset
Saving a Query
Creating Multi-Table Queries
Viewing table names
Adding multiple fields
Recognizing the limitations of multi-table queries
Overcoming query limitations
Working with the Table Pane
Looking at the join line
Moving a table
Removing a table
Adding more tables
Creating and Working with Query Joins
Understanding joins
Leveraging ad hoc table joins
Specifying the type of join
Deleting joins
Chapter 9: Using Operators and Expressions in Access
Introducing Operators
Types of operators
Operator precedence
Using Operators and Expressions in Queries
Using query comparison operators
Understanding complex criteria
Using functions in select queries
Referencing fields in select queries
Entering Single-Value Field Criteria
Entering character (Text or Memo) criteria
The Like operator and wildcards
Specifying non-matching values
Entering numeric criteria
Entering true or false criteria
Entering OLE object criteria
Using Multiple Criteria in a Query
Understanding an Or operation
Specifying multiple values with the Or operator
Using the Or cell of the QBE pane
Using a list of values with the In operator
Using And to specify a range
Using the Between...And operator
Searching for null data
Entering Criteria in Multiple Fields
Using And and Or across fields in a query
Specifying Or criteria across fields of a query
Using And and Or together in different fields
A complex query on different lines
Chapter 10: Going Beyond Select Queries
Aggregate Queries
Creating an aggregate query
About aggregate functions
Action Queries
Make-table queries
Delete queries
Append queries
Update queries
Crosstab Queries
Using the Crosstab Query Wizard
Manually creating a crosstab query
Part IV: Analyzing Data in Access
Chapter 11: Transforming Data in Access
Finding and Removing Duplicate Records
Defining duplicate records
Finding duplicate records
Removing duplicate records
Common Transformation Tasks
Filling in blank fields
Concatenating
Changing case
Removing leading and trailing spaces from a string
Finding and replacing specific text
Adding your own text in key positions within a string
Parsing strings using character markers
Chapter 12: Working with Calculations and Dates
Using Calculations in Your Analyses
Common calculation scenarios
Constructing calculations with the Expression Builder
Common calculation errors
Using Dates in Your Analyses
Simple date calculations
Advanced analysis using functions
Chapter 13: Performing Conditional Analyses
Using Parameter Queries
How parameter queries work
Ground rules of parameter queries
Working with parameter queries
Using Conditional Functions
The IIf function
The Switch function
Comparing the IIf and Switch functions
Chapter 14: Fundamentals of Using Access SQL
Understanding Basic SQL
The SELECT statement
The WHERE clause
Making sense of joins
Getting Fancy with Advanced SQL Statements
Expanding your search with the Like operator
Selecting unique values and rows without grouping
Grouping and aggregating with the GROUP BY clause
Setting sort order with the ORDER BY clause
Creating aliases with the AS clause
Showing only the SELECT TOP or SELECT TOP PERCENT
Performing action queries via SQL statements
Creating crosstabs with the TRANSFORM statement
Using SQL Specific Queries
Merging datasets with the UNION operator
Creating a table with the CREATE TABLE statement
Manipulating columns with the ALTER TABLE statement
Creating pass-through queries
Chapter 15: Subqueries and Domain Aggregate Functions
Enhancing Your Analyses with Subqueries
Why use subqueries?
Subquery ground rules
Creating subqueries without typing SQL statements
Using IN and NOT IN with subqueries
Using subqueries with comparison operators
Using subqueries as expressions
Using correlated subqueries
Using subqueries within action queries
Domain Aggregate Functions
Understanding the different domain aggregate functions
Examining the syntax of domain aggregate functions
Using domain aggregate functions
Chapter 16: Running Descriptive Statistics in Access
Basic Descriptive Statistics
Running descriptive statistics with aggregate queries
Determining rank, mode, and median
Pulling a random sampling from your dataset
Advanced Descriptive Statistics
Calculating percentile ranking
Determining the quartile standing of a record
Creating a frequency distribution
Part V: Working with Access Forms and Reports
Chapter 17: Creating Basic Access Forms
Formulating Forms
Creating a new form
Looking at special types of forms
Resizing the form area
Saving your form
Working with Controls
Categorizing controls
Adding a control
Selecting and deselecting controls
Manipulating controls
Introducing Properties
Displaying the Property Sheet
Getting acquainted with the Property Sheet
Changing a control's property setting
Naming control labels and their captions
Chapter 18: Working with Data on Access Forms
Using Form View
Looking at the Home tab of the Ribbon
Navigating among fields
Moving among records in a form
Changing Values in a Form
Knowing which controls you can't edit
Working with pictures and OLE objects
Entering data in the Long Text field
Entering data in the Date field
Using option groups
Using combo boxes and list boxes
Switching to Datasheet view
Saving a record
Printing a Form
Working with Form Properties
Changing the title bar text with the Caption property
Creating a bound form
Specifying how to view the form
Removing the Record Selector
Looking at other form properties
Adding a Form Header or Footer
Working with Section Properties
The Visible property
The Height property
The Back Color property
The Special Effect property
The Display When property
The printing properties
Changing the Layout
Changing a control's properties
Setting the tab order
Modifying the format of text in a control
Using the Field List to add controls
Converting a Form to a Report
Chapter 19: Working with Form Controls
Setting Control Properties
Customizing default properties
Looking at common controls and properties
Creating a Calculated Control
Working with Subforms
Form Design Tips
Using the Tab Stop property
Tallying check boxes
Using SQL for a faster refresh
Setting up combo boxes and list boxes
Tackling Advanced Forms Techniques
Using the Page Number and Date/Time controls
Using the Image control
Morphing a control
Using the Format Painter
Offering more end-user help
Adding background pictures
Limiting the records shown on a form
Using the Tab Control
Using Dialog Boxes to Collect Information
Designing the query
Setting up the command buttons
Adding a default button
Setting a Cancel button
Removing the control menu
Designing a Form from Scratch
Creating the basic form
Creating a subform
Adding the subform
Changing the form's behavior
Changing the form's appearance
Chapter 20: Presenting Data with Access Reports
Introducing Reports
Identifying the different types of reports
Distinguishing between reports and forms
Creating a Report, from Beginning to End
Defining the report layout
Assembling the data
Creating a report with the Report Wizard
Printing or viewing the report
Saving the report
Banded Report Design Concepts
The Report Header section
The Page Header section
The Group Header section
The Detail section
The Group Footer section
The Page Footer section
The Report Footer section
Creating a Report from Scratch
Creating a new report and binding it to a query
Defining the report page size and layout
Placing controls on the report
Resizing a section
Working with text boxes
Changing label and text-box control properties
Growing and shrinking Text Box controls
Sorting and grouping data
Sorting data within groups
Adding page breaks
Improving the Report's Appearance
Adjusting the page header
Creating an expression in the group header
Creating a report header
Chapter 21: Advanced Access Report Techniques
Grouping and Sorting Data
Grouping data alphabetically
Grouping on date intervals
Hiding repeating information
Hiding a page header
Starting a new page number for each group
Formatting Data
Creating numbered lists
Adding bullet characters
Adding emphasis at runtime
Avoiding empty reports
Inserting vertical lines between columns
Adding a blank line every n records
Even-odd page printing
Using different formats in the same text box
Centering the title
Easily aligning control labels
Micro-adjusting controls
Adding Data
Adding more information to a report
Adding the user's name to a bound report
Trying More Techniques
Displaying all reports in a combo box
Fast printing from queried data
Using snaking columns in a report
Exploiting two-pass report processing
Assigning unique names to controls
Part VI: Access Programming Fundamentals
Chapter 22: Using Access Macros
An Introduction to Macros
Creating a macro
Assigning a macro to an event
Understanding Macro Security
Enabling sandbox mode
The Trust Center
Multi-Action Macros
Submacros
Conditions
Opening reports using conditions
Multiple actions in conditions
Temporary Variables
Enhancing a macro you've already created
Using temporary variables to simplify macros
Using temporary variables in VBA
Error Handling and Macro Debugging
The OnError action
The MacroError object
Debugging macros
Embedded Macros
Macros versus VBA Statements
Choosing between macros and VBA
Converting existing macros to VBA
Chapter 23: Getting Started with Access VBA
Introducing Visual Basic for Applications
Understanding VBA Terminology
Starting with VBA Code Basics
Creating VBA Programs
Modules and procedures
Working in the code window
Understanding VBA Branching Constructs
Branching
Looping
Working with Objects and Collections
An object primer
Properties and methods
The With statement
The For Each statement
Exploring the Visual Basic Editor
The Immediate window
The Project Explorer
The Object Browser
VBE options
Chapter 24: Mastering VBA Data Types and Procedures
Using Variables
Naming variables
Declaring variables
Working with Data Types
Comparing implicit and explicit variables
Forcing explicit declaration
Using a naming convention
Understanding variable scope and lifetime
Using constants
Working with arrays
Understanding Subs and Functions
Understanding where to create a procedure
Calling VBA procedures
Creating subs
Creating Functions
Handling parameters
Calling a function and passing parameters
Creating a function to calculate sales tax
Simplifying Code with Named Arguments
Chapter 25: Understanding the Access Event Model
Programming Events
Understanding how events trigger VBA code
Creating event procedures
Identifying Common Events
Form event procedures
Control event procedures
Report event procedures
Report section event procedures
Paying Attention to Event Sequence
Looking at common event sequences
Writing simple form and control event procedures
Chapter 26: Debugging Your Access Applications
Organizing VBA Code
Testing Your Applications
Testing functions
Compiling VBA code
Traditional Debugging Techniques
Using MsgBox
Using Debug.Print
Using the Access Debugging Tools
Running code with the Immediate window
Suspending execution with breakpoints
Looking at variables with the Locals window
Setting watches with the Watches window
Using conditional watches
Using the Call Stack window
Trapping Errors in Your Code
Understanding error trapping
The Err object
Including error handling in your procedures
Part VII: Advanced Access Programming Techniques
Chapter 27: Accessing Data with VBA Code
Working with Data
Understanding ADO Objects
The ADO Connection object
The ADO Command object
The ADO Recordset object
Understanding DAO Objects
The DAO DBEngine object
The DAO Workspace object
The DAO Database object
The DAO TableDef object
The DAO QueryDef object
The DAO Recordset object
The DAO Field objects (recordsets)
Writing VBA Code to Update a Table
Updating fields in a record using ADO
Updating a calculated control
Adding a new record
Deleting a record
Deleting related records in multiple tables
Chapter 28: Advanced Data Access with VBA
Adding an Unbound Combo Box to a Form to Find Data
Using the FindRecord method
Using a bookmark
Filtering a Form
With code
With a query
Chapter 29: Integrating Access and SQL Server
Introducing SQL Server Express
Understanding Data Types in SQL Server
Installing SQL Server Express
Installing the database engine
Installing a sample database
Getting to know Management Studio
Using the command line
Connecting to SQL Server
Creating a data source
Linking SQL Server to Access
Using ADO with SQL Server
Working with SQL Server Objects
Using SQL Server tables from Access
Views
Stored procedures
Triggers
Chapter 30: Customizing the Ribbon
The Ribbon Hierarchy
Controls for Access Ribbons
Special Ribbon features
Editing the Default Ribbon
Working with the Quick Access Toolbar
Developing Custom Ribbons
The Ribbon creation process
Using VBA callbacks
Creating a Custom Ribbon
Step 1: Design the Ribbon and build the XML
Step 2: Write the callback routines
Step 3: Create the USysRibbons table
Step 4: Add XML to USysRibbons
Step 5: Specify the custom Ribbon property
The Basic Ribbon XML
Adding Ribbon Controls
Specifying imageMso
The Label control
The Button control
Separators
Check boxes
The DropDown control
The SplitButton Control
Attaching Ribbons to Forms and Reports
Completely Removing the Ribbon
Chapter 31: Preparing Your Access Application for Distribution
Defining the Current Database Options
Application options
Navigation options
Ribbon and toolbar options
Name AutoCorrect Options
Developing the Application
Building to a specification
Creating documentation
Testing the application before distribution
Polishing Your Application
Giving your application a consistent look and feel
Adding common professional components
Making the application easy to start
Bulletproofing an Application
Using error trapping on all Visual Basic procedures
Separating tables from the rest of the application
Building bulletproof forms
Validating user input
Using the /runtime option
Encrypting or encoding a database
Protecting Visual Basic code
Securing the Environment
Setting startup options in code
Disabling startup bypass
Setting property values
Getting property values
Part VIII: Access and Windows SharePoint Services
Chapter 32: Understanding Windows SharePoint Services
Introducing SharePoint
Reviewing Various Types of SharePoint Sites
Looking at a SharePoint Website
Understanding SharePoint documents
Understanding SharePoint lists
The Concept Behind Access and SharePoint Integration
Chapter 33: Integrating Access with SharePoint
Sharing Access Data with SharePoint
Linking to SharePoint lists
Importing SharePoint lists
Exporting Access tables to SharePoint
Moving Access tables to SharePoint
Using SharePoint Templates
Chapter 34: Understanding Access Services
Explaining Managed Applications
Looking at Web Publishing in Access
Why SharePoint?
Leveraging SharePoint features
Understanding Access Services
Examining Access Web Application Limits
Limitations of Access Services
Transactional limitations
Chapter 35: Deploying Access Applications to SharePoint
Publishing a Custom Access Application to SharePoint
Preparing the Access data model
Initializing and configuring the custom web application
Launching and managing your web application
Chapter 36: Using Access Data Macros
Introducing Data Macros
Understanding Table Events
“Before” events
“After” events
Using the Macro Designer for Data Macros
Understanding the Action Catalog
Program flow
Data blocks
Data actions
Creating Your First Data Macro
Managing Macro Objects
Collapsing and expanding macro items
Moving macro items
Saving a macro as XML
Recognizing the Limitations of Data Macros
Part IX: Appendixes
Appendix A: Access 2013 Specifications
Appendix B: Optimizing Access Applications
Organizing your modules
Pruning the call tree
Putting your application's code into a compiled state
Losing the compiled state
Tuning your system
Getting the most from your tables
Getting the most from your queries
Getting the most from your forms and reports
Getting the most from your modules
Increasing network performance
Understanding how databases grow in size
Recognizing that compiling and compacting may not be enough
Making small changes to large databases
Appendix C: Understanding Query Performance and Database Corruption
Normalizing your database design
Using indexes on appropriate fields
Optimizing by improving query design
Compacting and repairing your database regularly
Identifying a corrupted database
Recovering a corrupted database
Preventing database corruption
Appendix D: Function Reference for Data Analysts
End User License Agreement