About the Authors
Credits
Acknowledgments
Foreword
Contents
Introduction
Chapter 1: Introduction to Microsoft Access 2007
A Brief History of Access
Is Access the Only Database System?
Developing Databases Without VBA Code
Summary
Chapter 2: Access, VBA, and Macros
Chapter 3: New Features in Access 2007
Who Benefits
New Look
Development Environment
Forms
Reports
Embedded Macros
Access Data Engine
Integration with SharePoint
External Data Sources
Security
Conver t with Confidence
ADE and Creating Runtime Files
What’s Gone or Deprecated
Summary
Chapter 4: Using the VBA Editor
Chapter 5 VBA Basics
VBA Objects
Variables and VBA Syntax
Other VBA Structures
Summary
Chapter 6: Using DAO to Access Data
Data Access Objects
Why Use DAO?
New Features in DAO
Referring to DAO Objects
The DBEngine Object
The Databases Collection
DAO Object Properties
Creating Schema Objects with DAO
Database Encryption with DAO
Managing Access ( JET) Security with DAO
Data Access with DAO
Append Only Fields
Summary
Chapter 7: Using ADO to Access Data
Ambiguous References
Referring to ADO Objects
Connecting to a Data Source
Rolling Your Own Connection String
Data Access with ADO
Creating ADO Recordsets
Creating Schema Recordsets
Using ADO Events
Testing the State Proper ty
Creating Schema Objects with ADOX
Managing Security with ADO
Summary
Chapter 8: Executing VBA
When Events Fire
VBA Procedures
Evaluating Expressions in VBA
Using Recordsets
Using Multiple Recordsets
Using VBA in Forms and Reports
Debugging VBA
Investigating Variables
Common VBA Techniques
String Concatenation Techniques
Summary
Chapter 9: VBA Error Handling
Why Use Error Handling?
Two Kinds of Errors: Unexpected and Expected
Basic Error Handling
Cleaning Up After an Error
More on Absorbing Expected Errors
Issues in Error Handling
Summary
Chapter 10: Using VBA to Enhance Forms
Chapter 11: Enhancing Reports with VBA
Chapter 12: Customizing the Ribbon
Ribbon Overview
Custom Menu Bars and Toolbars
Ribbon Customization
Saving a Custom Ribbon
Specifying the Custom Ribbon
Creating an Integrated Ribbon
Creating a Ribbon from Scratch
Customizing the Office Menu
Customizing the Quick Access Toolbar
More Ribbon Tips
Summary
Chapter 13: Creating Classes in VBA
Chapter 14: Extending VBA with APIs
Introducing the Win32 API
Introducing Linking
Linking Libraries in Access 2007
Understanding C Parameters
Err. LastDLLError
Distributing Applications That Reference Type Libraries and Custom DLLs
Summary
Chapter 15: SQL and VBA
Working with SQL Strings in VBA
Using SQL When Opening Forms and Reports
Using SQL to Enhance Forms
The ReplaceOrderByClause and ReplaceWhereClause Functions
Summary
Chapter 16: Working with Office Applications
Sharing Information Is a Two-Way Street
Working with Outlook
Sending Information from Access to Excel
Exchanging Data with Microsoft Word
Sending Data to PowerPoint
Pulling Data from Access
Summary
Chapter 17: Working with SharePoint
Chapter 18: Database Security
Chapter 19: Understanding Client-Server Development with VBA
Client-Ser ver Applications
Choosing the Correct File Format
Controlling the Logon Process
Binding ADODB Recordsets
Using Unbound Forms
Summary
Chapter 20: Working with the Win32 Registry
Chapter 21: Using the ADE Tools
The Redistributable Access Runtime
The Package Solution Wizard
Save as Template
Source Code Control Support
Summary
Chapter 22: Protecting Yourself with Access 2007 Security
Appendix A: Upgrading to Access 2007
To Conver t or To Enable
Installing Multiple Versions of Access on One PC
Changing File Formats
Converting a Secured Database
Converting a Replicated Database
Enabling a Database
Appendix B: References for Projects
Appendix C: Calling Managed Code
Appendix D: DAO Object Method and Property Descriptions
Appendix E: ADO Object Model Reference
Appendix F: ADO Object Argument Enumeration Information
Connection. Execute Method Options
Recordset. Open Method Options
Connection. OpenSchema Method Options
Group or User SetPermissions Method Options
Appendix G: The Access Object Model
The Application Object
AllObjects Collection
The CurrentData Object
The CurrentProject Object
AccessObject
The DoCmd Object
The Form Object
The Control Object
The ImportExportSpecification Object
The Module Object
The Printer Object
The References Collection and Reference Object
The Reports Collection and Repor t Object
The Screen Object
The Section Object
The SmartTag Object
The SubForm Object
The SubReport Object
Other Helpful Information
Appendix H: Windows API Reference Information
Appendix I: Windows Registry Information
Windows Registry Data Types
Registry Root Key Hives
Registr y Function Declarations
Registry API Constant and User-Defined Type Declarations
Appendix J: Access Wizards, Builders, and Managers
Access Wizards
Access Builders
Access Managers
Appendix K: Reserved Words and Special Characters
What Are the Sources of Reserved Words?
Reserved Words with Error Messages
Reserved Word List
What Are Special Characters?
Appendix L: Naming Conventions
Why Implement Naming Conventions?
A Brief Histor y
The Fundamentals of the Hungarian Convention
Rules for Creating Names — Adding the Personal Touch
More Do’s and Don’ts
Tables of Tags
Standards
Appendix M: Tips and Tricks
Visual Interface Standards
Daisy Chain Your Forms
Find Records
Split Your Application
Display Informative Form Captions
Preload Records
Use a Splash Screen
Pop-Up Memo Workspace Form with Spell Check
Determine the User Name
Index