Book description
Access 2007 Programming by Example with VBA, XML, and ASP shows non-programmers how Access databases can be created, managed, and customized with Visual Basic for Applications (VBA) — a powerful programming language built into Access. Hundreds of hands-on examples and projects throughout the book show users how to take charge of their Access databases with programming.
Learn how to Write and debug your programming code with the Visual Basic Editor; access and manipulate databases with Data Access Objects (DAO) and ActiveX Data Objects (ADO); use the Data Definition Language (DDL) to enforce data integrity and manage database security; modify the behavior of forms, reports, and controls by writing event procedures; publish dynamic Access data to the web using Active Server Pages (ASP) and Extensible Markup Language (XML); and work with the new features for tables, forms, reports, macros, and templates that are available in the Access 2007 user interface.
Table of contents
- Contents
- Acknowledgments
- Introduction
-
PART I Introduction to Access 2007 VBA Programming
- Chapter 1 Writing Procedures in Modules
- Chapter 2 The Visual Basic Editor (VBE)
-
Chapter 3 Variables, Data Types, and Constants
- What Is a Variable?
- What Are Data Types?
- Creating Variables
- Declaring Variables
- Specifying the Data Type of a Variable
- Using Type Declaration Characters
- Assigning Values to Variables
- Forcing Declaration of Variables
- Understanding the Scope and Lifetime of Variables
- Understanding and Using Temporary Variables
- Understanding and Using Static Variables
- Understanding and Using Object Variables
- Finding a Variable Definition
- What Type Is This Variable?
- Using Constants in VBA Procedures
- Intrinsic Constants
- Grouping Constants with the Enum Type
- Chapter Summary
-
Chapter 4 Passing Arguments to Procedures and Functions
- Writing a Function Procedure
- Specifying the Data Type for a Function’s Result
- Passing Arguments by Reference and by Value
- Using Optional Arguments
- Using the IsMissing Function
- Built-in Functions
- Using the MsgBox Function
- Using the InputBox Function
- Converting Data Types
- Using Master Procedures and Subprocedures
- Chapter Summary
- Chapter 5 Decision Making with VBA
- Chapter 6 Repeating Actions in VBA
- Chapter 7 Working with Arrays
-
Chapter 8 Custom Collections and Class Modules
- Terminology
- Working with Collections
- Creating Custom Objects
- Creating the User Interface
- Running the Custom Application
- Watching the Execution of Your VBA Procedures
- Chapter Summary
-
Chapter 9 Debugging VBA Procedures and Handling Errors
- Testing VBA Procedures
- Stopping a Procedure
- Using the Locals Window and the Call Stack Dialog Box
- Stepping Through VBA Procedures
- Setting the Next Statement
- Showing the Next Statement
- Stopping and Resetting VBA Procedures
- Understanding and Using Conditional Compilation
- Navigating with Bookmarks
- Trapping Errors
- Generating Errors to Test Error Handling
- Chapter Summary
-
PART II Access VBA Programming with DAO and ADO
-
Chapter 10 Data Access Technologies in Microsoft Access
- Understanding Database Engines: Jet/ACE
- Understanding Access Versions and File Formats
- Understanding Library References
- Overview of Object Libraries in Microsoft Access
- Creating a Reference to the ADO Library
- Understanding Connection Strings
- Using ODBC Connection Strings
- Using OLE DB Connection Strings
- Connection String via a Data Link File
-
Opening Microsoft Access Databases
- Opening a Microsoft Jet Database in Read/Write Mode with DAO
- Opening a Microsoft Jet Database in Read/Write Mode with ADO
- Opening a Microsoft Access Database in Read-Only Mode with DAO
- Opening a a Microsoft Jet Database in Read-Only Mode with ADO
- Opening a Microsoft Jet Database Secured with a Password
- Opening a Microsoft Jet Database with User-Level Security
- Connecting to the Current Access Database
- Opening Other Databases, Spreadsheets, and Text Files from Access 2007
- Creating a New Access Database
- Copying a Database
- Database Errors
- Compacting a Database
- Chapter Summary
-
Chapter 11 Creating and Accessing Database Tables and Fields
- Creating a Microsoft Access Table and Setting Field Properties (DAO Method)
- Creating a Microsoft Access Table and Setting Field Properties (ADO Method)
- Copying a Table
- Deleting a Database Table
- Adding New Fields to an Existing Table
- Removing a Field from a Table
- Retrieving Table Properties
- Retrieving Field Properties
- Linking a Microsoft Access Table
- Linking a dBASE Table
- Linking a Microsoft Excel Spreadsheet
- Listing Database Tables
- Listing Tables and Fields
- Listing Data Types
- Changing the AutoNumber
- Chapter Summary
- Chapter 12 Setting Up Primary Keys, Indexes, and Table Relationships
-
Chapter 13 Finding and Reading Records
- Introduction to DAO Recordsets
-
Introduction to ADO Recordsets
- Cursor Types
- Lock Types
- Cursor Location
- The Options Parameter
- Opening a Recordset
- Moving Around in a Recordset
- Finding the Record Position
- Reading Data from a Field
- Returning a Recordset as a String
- Finding Records Using the Find Method
- Finding Records Using the Seek Method
- Finding a Record Based on Multiple Conditions
- Using Bookmarks
- Using Bookmarks to Filter a Recordset
- Using the GetRows Method to Fill the Recordset
- Chapter Summary
-
Chapter 14 Working with Records
- Adding a New Record with DAO
- Adding a New Record with ADO
- Modifying a Record with DAO
- Modifying a Record with ADO
- Editing Multiple Records with ADO
- DeletingaRecordwithDAO
- Deleting a Record with ADO
- Copying Records to an Excel Spreadsheet
- Copying Records to a Word Document
- Copying Records to a Text File
- Filtering Records Using the SQL WHERE Clause
- Filtering Records Using the Filter Property
- Sorting Records
- Chapter Summary
-
Chapter 15 Creating and Running Queries with DAO/ADO
- Creating a Select Query Manually
- Creating a Select Query with DAO
- Creating a Select Query with ADO
- Executing an Existing Select Query with ADO
- Modifying an Existing Query with ADO
- Creating and Running a Parameter Query with DAO
- Creating and Running a Parameter Query with ADO
- Creating and Running a Make-Table Query with DAO
- Creating and Running an Update Query with DAO
- Executing an Update Query with ADO
- Running an Append Query with DAO/ADO
- Running a Delete Query with DAO
- Creating and Running a Pass-Through Query with DAO
- Creating and Executing a Pass-Through Query with ADO
- Performing Other Operations with Queries
- Deleting a Query from a Database with DAO/ADO
- Determining if a Query Is Updatable
- Chapter Summary
-
Chapter 16 Using Advanced ADO/DAO Features
- Fabricating a Recordset
- Disconnected Recordsets
- Saving a Recordset to Disk
- Cloning a Recordset
- Introduction to Data Shaping
- Transaction Processing
- Chapter Summary
-
Chapter 17 Implementing Database Security
- Two Types of Security in Microsoft Access
- Understanding Workgroup Information Files
- Creating and Managing Group and User Accounts
-
Setting and Retrieving User and Group Permissions
- Determining the Object Owner
- Setting User Permissions for an Object
- Setting User Permissions for a Database
- Setting User Permissions for Containers
- Checking Permissions for Objects
- Setting a Database Password Using the CompactDatabase Method
- Setting a Database Password Using the NewPassword Method
- Changing a User Password
- Encrypting a Secured MDB Database
- Chapter Summary
-
Chapter 18 Database Replication
- Creating a Design Master
- Creating a Full Replica
- Creating a Partial Replica
- Replicating Objects
- Keeping Objects Local
- Synchronizing Replicas
- Retrieving Replica Properties
- Synchronization Conflicts
- Chapter Summary
-
Chapter 10 Data Access Technologies in Microsoft Access
-
PART III Programming with the Jet Data Definition Language
-
Chapter 19 Creating, Modifying, and Deleting Tables and Fields
- Hands-On 19-1: Setting the ANSI SQL Query Mode
- Creating Tables
- Deleting Tables
-
Modifying Tables with DDL
- Adding New Fields to a Table
- Changing the Data Type of a Table Column
- Changing the Size of a Text Column
- Deleting a Column from a Table
- Adding a Primary Key to a Table
- Adding a Multiple-Field Index to a Table
- Deleting an Indexed Column
- Deleting an Index
- Setting a Default Value for a Table Column
- Changing the Seed and Increment Value of AutoNumber Columns
- Chapter Summary
- Chapter 20 Enforcing Data Integrity and Relationships between Tables
- Chapter 21 Defining Indexes and Primary Keys
-
Chapter 22 Database Security
- Setting the Database Password
- Removing the Database Password
- Creating a User Account
- Changing a User Password
- Creating a Group Account
- Adding Users to Groups
- Removing a User from a Group
- Deleting a User Account
- Granting Permissions for an Object
- Revoking Security Permissions
- Deleting a Group Account
- Chapter Summary
- Chapter 23 Views and Stored Procedures
-
Chapter 19 Creating, Modifying, and Deleting Tables and Fields
-
PART IV Event Programming in Forms and Reports
-
Chapter 24 Using Form Events
- Data Events
- Focus Events
- Mouse Events
- Keyboard Events
- Error Events
- Filter Events
- Timing Events
- PivotTable/PivotChart Events
- Events Recognized by Form Sections
- Chapter Summary
- Chapter 25 Using Report Events
- Chapter 26 Events Recognized by Controls
- Chapter 27 More about Event Programming
-
Chapter 24 Using Form Events
-
PART V Taking Your VBA Programming Skills to the Web
-
Chapter 28 Access and Active Server Pages
- Introduction to Active Server Pages
- The ASP Object Model
- Installing Internet Information Services (IIS)
- Creating a Virtual Directory
- Retrieving Records
- Database Lookup Using Drop-Down Lists
- Database Lookup Using a Multiple-Selection List Box
- Adding Data into a Table
- Modifying a Record
- Deleting a Record
- Creating a Web User Interface for Database Access
- Chapter Summary
-
Chapter 29 XML Features in Access 2007
- What Is XML?
- XML Support in Access 2007
- Exporting XML Data
- Applying XSLT Transforms to Exported Data
- Importing XML Data
-
Exporting to and Importing from XML Programmatically
- Exporting to XML Using the ExportXML Method
- Transforming XML Data with the TransformXML Method
- Importing to XML Using the ImportXML Method
- Manipulating XML Documents Programmatically
- Using ActiveX Data Objects with XML
- Chapter Summary
-
Chapter 28 Access and Active Server Pages
-
PART VI Working with New Features in Access 2007
-
Chapter 30 Programming the User Interface
- The Getting Started with Microsoft Office Access Window
- Customizing the Navigation Pane
- Using VBA to Customize the Navigation Pane
- A Quick Overview of Access 2007 Ribbon Interface
- Ribbon Programming with XML, VBA, and Macros
- Using Images in Ribbon Customizations
- Using Various Controls in Ribbon Customizations
- The CommandBars Object and the Ribbon
- Customizing the Office Button Menu
- Chapter Summary
-
Chapter 31 Tables, Forms, and Reports
-
New Features in Tables
- Saving Tables as Queries
- Working with Attachment Data Type Fields
- Working with Multi-value Fields
- Working with Append Only Memo Fields
- Rich Text Memo Fields
- New Features in Forms
- New Features in Reports
- Chapter Summary
-
New Features in Tables
-
Chapter 32 Macros and Templates
- New Features in Macros
- New Features in Templates
- Chapter Summary
-
Chapter 30 Programming the User Interface
- Index
Product information
- Title: Access 2007 Programming by Example with VBA, XML, and ASP
- Author(s):
- Release date: December 2007
- Publisher(s): Jones & Bartlett Learning
- ISBN: 9781449612733
You might also like
book
Access™ 2007 VBA Programmer's Reference
This resource provides the tools you need to leverage Access 2007's built-in functionality and VBA in …
book
Access 2003 VBA Programmer's Reference
Covers all features of VBA programming for Access database applications Begins with an overview of VBA …
book
Excel® 2007 VBA Programmer's Reference
Get ready to take your Excel applications to the next level by harnessing the power of …
book
Excel 2007 VBA Programming with XML and ASP
Excel 2007 Programming by Example with XML and ASP offers a hands-on approach for those looking …