Chapter
Conventions Used in This Book
How This Book Is Organized
Part I: Access Building Blocks
Chapter 1: An Introduction to Database Development
The Database Terminology of Access
Data-entry and display forms
Planning for database objects
A Five-Step Design Method
Step 1: The overall design—from concept to reality
Chapter 2: Getting Started with Access
The Access Welcome Screen
How to Create a Blank Database
The Access 2019 Interface
Part II: Understanding Access Tables
Chapter 3: Creating Access Tables
Entering a field description
Specifying data validation rules
Changing a field location
Handling data conversion issues
Assigning field properties
Validation Rule and Validation Text
Understanding tblCustomers Field Properties
Creating composite primary keys
The importance of indexes
Saving the Completed Table
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
No primary key can contain a null value
All foreign key values must be matched by corresponding primary keys
Deciding on a primary key
Looking at the benefits of a primary key
Designating a primary key
Single-field versus composite primary keys
Natural versus surrogate primary keys
Creating relationships and enforcing referential integrity
Specifying the join type between tables
Enforcing referential integrity
Viewing all relationships
Following application-specific integrity rules
Chapter 5: Working with Access Tables
Looking at the Datasheet Window
Moving within a datasheet
Using the Navigation buttons
Examining the Datasheet Ribbon
Understanding automatic data-type validation
Knowing how properties affect data entry
Number/Currency data entry with data validation
Long Text field data entry
Navigating Records in a Datasheet
Changing Values in a Datasheet
Manually replacing an existing value
Changing an existing value
Copying and Pasting Values
Changing the field display width
Changing the record display height
Displaying cell gridlines and alternate row colors
Hiding and unhiding columns
Saving the changed layout
Sorting and Filtering Records in a Datasheet
Chapter 6: Importing and Exporting Data
How Access Works with External Data
Ways of working with external data
When to link to external data
When to import external data
Options for Importing and Exporting
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
Exporting to External Formats
Exporting objects to other Access databases
Exporting through ODBC drivers
Chapter 7: Linking to 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
Deleting a linked table reference
Viewing or changing information for linked tables
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
Adding fields to your queries
Working with Query Fields
Selecting a field in the QBD grid
Resizing columns in the QBD grid
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
Creating Multi-table Queries
Recognizing the limitations of multi-table queries
Overcoming query limitations
Updating a unique index (primary key)
Replacing existing data in a query with a one-to-many relationship
Updating fields in queries
Working with the Table Pane
Creating and Working with Query Joins
Leveraging ad hoc table joins
Specifying the type of join
Chapter 9: Using Operators and Expressions in Access
Boolean (logical) operators
The mathematical precedence
The comparison 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 QBD pane
Using a list of values with the In operator
Using And to specify a range
Using the Between...And operator
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
Creating an aggregate query
About aggregate functions
Sum, Avg, Count, StDev, Var
Creating a crosstab query using the Crosstab Query Wizard
Creating a crosstab query manually
Using the query design grid to create your crosstab query
Customizing your crosstab queries
Optimizing Query Performance
Normalizing your database design
Using indexes on appropriate fields
Optimizing by improving query design
Compacting and repairing your database regularly
Part IV: Analyzing Data in Microsoft Access
Chapter 11: Transforming Data in Access
Finding and Removing Duplicate Records
Defining duplicate records
Finding duplicate records
Removing duplicate records
Common Transformation Tasks
Augmenting field values with your own text
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
Using constants in calculations
Using fields in calculations
Using the results of aggregation in calculations
Using the results of one calculation as an expression in another
Using a calculation as an argument in a function
Constructing calculations with the Expression Builder
Common calculation errors
Understanding the order of operator precedence
Watching out for null values
Watching the syntax in your expressions
Using Dates in Your Analyses
Advanced analysis using functions
The Year, Month, Day, and Weekday functions
Grouping dates into quarters
Chapter 13: Performing Conditional Analyses
How parameter queries work
Ground rules of parameter queries
Working with parameter queries
Working with multiple parameter conditions
Combining parameters with operators
Combining parameters with wildcards
Using parameters as calculation variables
Using parameters as function arguments
Using Conditional Functions
Using IIf to avoid mathematical errors
Nesting IIf functions for multiple conditions
Using IIf functions to create crosstab analyses
Comparing the IIf and Switch functions
Chapter 14: The Fundamentals of Using SQL
Selecting specific columns
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 the sort order with the ORDER BY clause
Creating aliases with the AS clause
Showing only the SELECT TOP or SELECT TOP PERCENT
Top values queries explained
The SELECT TOP PERCENT statement
Performing action queries via SQL statements
Make-table queries translated
Append queries translated
Update queries translated
Delete queries translated
Creating crosstabs with the TRANSFORM statement
Using SQL-Specific Queries
Merging data sets with the UNION operator
Creating a table with the CREATE TABLE statement
Manipulating columns with the ALTER TABLE statement
Adding a column with the ADD clause
Altering a column with the ALTER COLUMN clause
Deleting a column with the DROP COLUMN clause
Dynamically adding primary keys with the ADD CONSTRAINT clause
Creating pass-through queries
Chapter 15: Subqueries and Domain Aggregate Functions
Enhancing Your Analyses with Subqueries
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 a correlated subquery as an expression
Using subqueries within action queries
A subquery in a make-table query
A subquery in an append query
A subquery in an update query
A subquery in a delete query
Domain Aggregate Functions
Understanding the different domain aggregate functions
DStDev, DStDevP, DVar, and DvarP
Examining the syntax of domain aggregate functions
Using domain aggregate functions
Calculating the percent of total
Using a value from the previous record
Chapter 16: Running Descriptive Statistics in Access
Basic Descriptive Statistics
Running descriptive statistics with aggregate queries
Determining rank, mode, and median
Ranking the records in your data set
Getting the mode of a data set
Getting the median of a data set
Pulling a random sampling from your data set
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
Understanding Different Types of Forms
Looking at special types of forms
Selecting and deselecting controls
Selecting a single control
Selecting multiple controls
Sizing controls automatically
Modifying the appearance of a control
Changing a control’s type
Reattaching a label to a control
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
Looking at the Home tab of the Ribbon
The Text Formatting group
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 combo boxes and list boxes
Switching to Datasheet view
Working with Form Properties
Changing the title bar text with the Caption property
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 Special Effect property
The Display When property
Changing a control’s properties
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
The Command Button control
The Combo Box and List Box controls
The Check Box and Toggle Button controls
Creating a Calculated Control
Using the Tab Stop property
Setting up combo boxes and list boxes
Tackling Advanced Forms Techniques
Using the Page Number and Date/Time controls
Offering more end-user help
Adding background pictures
Limiting the records shown on a form
Using Dialog Boxes to Collect Information
Setting up the command buttons
Removing the control menu
Designing a Form from Scratch
Changing the form’s behavior
Setting the form properties
Looking up values during data entry
Changing the form’s appearance
Chapter 20: Presenting Data with Access Reports
Identifying the different types of reports
Distinguishing between reports and forms
Creating a Report, from Beginning to End
Defining the report layout
Creating a report with the Report Wizard
Selecting the grouping levels
Selecting summary options
Opening the report design
Adjusting the report’s layout
Creating new theme color schemes
Using the Print Preview window
Publishing in alternate formats
Viewing the report in Design view
Printing or viewing the report
Banded Report Design Concepts
The Report Header section
The Report Footer section
Creating a Report from Scratch
Creating a new report and binding it to a table
Defining the report page size and layout
Placing controls on the report
Modifying the appearance of text in a control
Working with Text Box controls
Adding and using Text Box controls
Entering an expression in a Text Box control
Sizing a Text Box control or Label control
Deleting and cutting attached labels from Text Box controls
Pasting labels into a report section
Moving Label and Text Box controls
Modifying the appearance of multiple controls
Changing Label and Text Box control properties
Growing and shrinking Text Box controls
Sorting and grouping data
Creating a group header or footer
Sorting data within groups
Moving controls between sections
Improving the Report’s Appearance
Adjusting the page header
Creating an expression in the group header
Chapter 21: Advanced Access Report Techniques
Grouping and Sorting Data
Grouping on date intervals
Hiding repeating information
Starting a new page number for each group
Adding emphasis at run time
Inserting vertical lines between columns
Adding a blank line every n records
Using different formats in the same text box
Adding more information to a report
Adding the user’s name to a bound report
Adding Even More Flexibility
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: Microsoft Access Programming Fundamentals
Chapter 22: Using Access Macros
An Introduction to Macros
Assigning a macro to an event
Understanding Macro Security
Opening reports using conditions
Multiple actions in conditions
Enhancing a macro you’ve already created
Using temporary variables to simplify macros
Using temporary variables in VBA
Error Handling and Macro Debugging
Macros versus VBA Statements
Choosing between macros and VBA
Converting existing macros to VBA
Chapter 23: Using Access Data Macros
Understanding Table Events
Using the Macro Builder for Data Macros
Understanding the Action Catalog
Creating Your First Data Macro
Collapsing and expanding macro items
Recognizing the Limitations of Data Macros
Chapter 24: Getting Started with Access VBA
Introducing Visual Basic for Applications
Understanding VBA Terminology
Starting with VBA Code Basics
Working in the code window
Understanding VBA Branching Constructs
The Select Case...End Select statement
Working with Objects and Collections
Exploring the Visual Basic Editor
The Editor tab of the Options dialog box
The Project Properties dialog box
Chapter 25: Mastering VBA Data Types and Procedures
Comparing implicit and explicit variables
Forcing explicit declaration
Using a naming convention with variables
Understanding variable scope and lifetime
Determining a variable’s lifetime
Deciding on a variable’s scope
Using a naming convention with constants
Eliminating hard-coded values
Understanding Subs and Functions
Understanding where to create a procedure
Calling a function and passing parameters
Creating a function to calculate sales tax
Simplifying Code with Named Arguments
Chapter 26: Understanding the Access Event Model
Understanding how events trigger VBA code
Creating event procedures
Identifying Common Events
Form mouse and keyboard events
Report section event procedures
Paying Attention to Event Sequence
Looking at common event sequences
Writing simple form and control event procedures
Opening a form with an event procedure
Running an event procedure when closing a form
Using an event procedure to confirm record deletion
Chapter 27: Debugging Your Access Applications
Testing Your Applications
Traditional Debugging Techniques
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
Including error handling in your procedures
Part VII: Advanced Access Programming Techniques
Chapter 28: Accessing Data with VBA
Understanding DAO Objects
Detecting the recordset end or beginning
The DAO Field objects (recordsets)
Understanding ADO Objects
The ADO Connection object
Writing VBA Code to Update a Table
Updating fields in a record using ADO
Updating a calculated control
Recalculating a control when updating or adding a record
Checking the status of a record deletion
Eliminating repetitive code
Deleting related records in multiple tables
Chapter 29: Advanced Data Access with VBA
Adding an Unbound Combo Box to a Form to Find Data
Using the FindRecord method
Creating a parameter query
Creating an interactive filter dialog box
Linking the dialog box to another form
Chapter 30: Customizing the Ribbon
Controls for Access Ribbons
Editing the Default Ribbon
Working with the Quick Access Toolbar
Developing Custom Ribbons
The Ribbon creation process
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
Attaching Ribbons to Forms and Reports
Removing the Ribbon Completely
Chapter 31: Preparing Your Access Application for Distribution
Defining the Current Database Options
Remove Personal Information from File Properties on Save
Use Windows-Themed Controls on Forms
Enable Design Changes for Tables in Datasheet View
Check for Truncated Number Fields
Picture Property Storage Format
The Display Navigation Pane check box
The Navigation Options button
Ribbon and toolbar options
Allow Default Shortcut Menus
Developing the Application
Building to a specification
Documenting the code you write
Documenting the application
Testing the application before distribution
Polishing Your Application
Giving your application a consistent look and feel
Adding common professional components
An application switchboard
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
Using the /runtime option
Encrypting or encoding a database
Removing a database password
Protecting Visual Basic code
Setting startup options in code
Chapter 32: Integrating Access with SharePoint
Understanding SharePoint Sites
Sharing Data between Access and SharePoint
Linking to SharePoint lists
Importing SharePoint lists
Exporting Access tables to SharePoint
Moving Access tables to SharePoint
Using SharePoint Templates