You are previewing Access Cookbook, 2nd Edition.
O'Reilly logo
Access Cookbook, 2nd Edition

Book Description

Not a reference book, and not a tutorial either, the new second edition of the highly regarded Access Cookbook is an uncommonly useful collection of solutions to problems that Access users and developers are likely to face as they attempt to build increasingly complex applications. Although using any single "recipe" in the book will more than pay back the cost of the book in terms of both hours saved and frustration thwarted, Access Cookbook, Second Edition is much more than a handy assortment of cut-and-paste code. Each of the "recipes" examine a particular problem--problems that commonly occur when you push the upper limits of Access, or ones that are likely to trip up a developer attempting to design a more elegant Access application--even some things you never knew Access could do. The authors then, in a clear, accessible, step-by-step style, present the problems' solution. Following each "recipe" are insights on how Access works, potential pitfalls, interesting programming techniques that are used in the solution, and how and why the solution works, so you can adapt the problem-solving techniques to other similar situations. Fully updated for Access 2003, Access Cookbook, Second Edition is also one of the first books to thoroughly explore new support for .NET managed code and XML. All of the practical, real-world examples have been tested for compatibility with Access 2003, Windows XP, and Windows Server 2003. This updated new edition also covers Access and SharePoint, Access and SmartTags, Access and .NET; and Access and XML. Access power users and programmers at all levels, from the relatively inexperienced to the most sophisticated, will rely on the Access Cookbook for quick solutions to gnarly problems. With a dog-eared copy of Access Cookbook at your side, you can spend your time and energy where it matters most: working on the interesting facets of your Access application, not just the time-consuming ones.

Table of Contents

  1. Access Cookbook, 2nd Edition
  2. A Note Regarding Supplemental Files
  3. Preface
    1. What This Book Is About
      1. Promotes Creative Use of the Product
      2. Uses the Tools at Hand
      3. Follows a Problem-Solution Format
    2. Who This Book Is For
    3. What You Need to Use This Book
    4. How This Book Is Organized
    5. What We Left Out
      1. How Do I Set Control Properties?
      2. How Do I Create a New Module?
      3. How Do I Import an Object?
      4. How Do I Create an Event Macro?
      5. How Do I Create an Event Procedure?
      6. How Do I Place Code in a Form or Report's Module?
      7. How Do I Know What to Do with Code Examples?
      8. How Do I Use Data Access Objects (DAO) in New Databases?
    6. Conventions Used in This Book
    7. Comments and Questions
    8. Acknowledgments
  4. 1. Queries
    1. 1.1. Specify Query Criteria at Runtime
      1. 1.1.1. Problem
      2. 1.1.2. Solution
      3. 1.1.3. Discussion
    2. 1.2. Using a Form-Based Parameter Query
      1. 1.2.1. Problem
      2. 1.2.2. Solution
      3. 1.2.3. Discussion
    3. 1.3. Limit the Items in One Combo Box Based on the Selected Item in Another
      1. 1.3.1. Problem
      2. 1.3.2. Solution
      3. 1.3.3. Discussion
      4. 1.3.4. See Also
    4. 1.4. Make Formatted Date Columns Sort Correctly in a Crosstab Query
      1. 1.4.1. Problem
      2. 1.4.2. Solution
      3. 1.4.3. Discussion
    5. 1.5. Group Mailing Labels by Address
      1. 1.5.1. Problem
      2. 1.5.2. Solution
      3. 1.5.3. Discussion
      4. 1.5.4. See Also
    6. 1.6. Use a Field in One Table to Update a Field in Another Table
      1. 1.6.1. Problem
      2. 1.6.2. Solution
      3. 1.6.3. Discussion
    7. 1.7. Use a VBA Variable to Filter a Query
      1. 1.7.1. Problem
      2. 1.7.2. Solution
      3. 1.7.3. Discussion
      4. 1.7.4. See Also
    8. 1.8. Use a Query to Retrieve a Random Set of Rows
      1. 1.8.1. Problem
      2. 1.8.2. Solution
      3. 1.8.3. Discussion
    9. 1.9. Create a Query That Will Show Aging of Receivables
      1. 1.9.1. Problem
      2. 1.9.2. Solution
      3. 1.9.3. Discussion
      4. 1.9.4. See Also
    10. 1.10. Create a Join That's Based on a Comparison Other than Equality
      1. 1.10.1. Problem
      2. 1.10.2. Solution
      3. 1.10.3. Discussion
    11. 1.11. Create a Query to Combine Data from Two Tables with Similar Structures
      1. 1.11.1. Problem
      2. 1.11.2. Solution
      3. 1.11.3. Discussion
    12. 1.12. Create a Combo Box That Allows a User to Select N/A
      1. 1.12.1. Problem
      2. 1.12.2. Solution
      3. 1.12.3. Discussion
      4. 1.12.4. See Also
    13. 1.13. Use a Query to Show the Relationship Between Employees and Supervisors
      1. 1.13.1. Problem
      2. 1.13.2. Solution
      3. 1.13.3. Discussion
    14. 1.14. Create a Query That Uses Case-Sensitive Criteria
      1. 1.14.1. Problem
      2. 1.14.2. Solution
      3. 1.14.3. Discussion
    15. 1.15. Use a Query to Create a New Table Complete with Indexes
      1. 1.15.1. Problem
      2. 1.15.2. Solution
      3. 1.15.3. Discussion
    16. 1.16. Save My Queries in a Table for Better Programmatic Access and Security
      1. 1.16.1. Problem
      2. 1.16.2. Solution
      3. 1.16.3. Discussion
    17. 1.17. Create a Recordset Based on a Parameter Query from VBA Code
      1. 1.17.1. Problem
      2. 1.17.2. Solution
      3. 1.17.3. Discussion
  5. 2. Forms
    1. 2.1. Make Custom Templates for Forms and Reports
      1. 2.1.1. Problem
      2. 2.1.2. Solution
      3. 2.1.3. Discussion
      4. 2.1.4. See Also
    2. 2.2. Highlight the Current Field in Data-Entry Forms
      1. 2.2.1. Problem
      2. 2.2.2. Solution
      3. 2.2.3. Discussion
      4. 2.2.4. See Also
    3. 2.3. Restrict the User to a Single Row on a Form
      1. 2.3.1. Problem
      2. 2.3.2. Solution
      3. 2.3.3. Discussion
      4. 2.3.4. See Also
    4. 2.4. Use an Option Group to Collect and Display Textual Information
      1. 2.4.1. Problem
      2. 2.4.2. Solution
      3. 2.4.3. Discussion
    5. 2.5. Display Multiple Pages of Information on One Form
      1. 2.5.1. Problem
      2. 2.5.2. Solution
      3. 2.5.3. Discussion
    6. 2.6. Provide Record Navigation Buttons on a Form
      1. 2.6.1. Problem
      2. 2.6.2. Solution
      3. 2.6.3. Discussion
      4. 2.6.4. See Also
    7. 2.7. Size a Form's Controls to Match the Form's Size
      1. 2.7.1. Problem
      2. 2.7.2. Solution
      3. 2.7.3. Discussion
    8. 2.8. Make a Simple "Searching" List Box
      1. 2.8.1. Problem
      2. 2.8.2. Solution
      3. 2.8.3. Discussion
    9. 2.9. Create a Replacement for Access's InputBox
      1. 2.9.1. Problem
      2. 2.9.2. Solution
      3. 2.9.3. Discussion
        1. 2.9.3.1. Using optional parameters
        2. 2.9.3.2. Creating pop-up forms
        3. 2.9.3.3. Initializing pop-up forms
        4. 2.9.3.4. Programmatically accessing online help
        5. 2.9.3.5. Miscellaneous comments
      4. 2.9.4. See Also
    10. 2.10. Store the Sizes and Locations of Forms
      1. 2.10.1. Problem
      2. 2.10.2. Solution
      3. 2.10.3. Discussion
      4. 2.10.4. See Also
    11. 2.11. Open Multiple Instances of a Form
      1. 2.11.1. Problem
      2. 2.11.2. Solution
      3. 2.11.3. Discussion
  6. 3. Reports
    1. 3.1. Create a Report with Line Numbers
      1. 3.1.1. Problem
      2. 3.1.2. Solution
      3. 3.1.3. Discussion
    2. 3.2. Print the Value of a Parameter on a Report
      1. 3.2.1. Problem
      2. 3.2.2. Solution
      3. 3.2.3. Discussion
    3. 3.3. Create a Report with Multiple Columns
      1. 3.3.1. Problem
      2. 3.3.2. Solution
      3. 3.3.3. Discussion
      4. 3.3.4. See Also
    4. 3.4. Print a Message on a Report if Certain Conditions Are Met
      1. 3.4.1. Problem
      2. 3.4.2. Solution
      3. 3.4.3. Discussion
    5. 3.5. Create a Page-Range Indicator on Each Page
      1. 3.5.1. Problem
      2. 3.5.2. Solution
      3. 3.5.3. Discussion
    6. 3.6. Create a Simple Bar Graph on a Report
      1. 3.6.1. Problem
      2. 3.6.2. Solution
      3. 3.6.3. Discussion
    7. 3.7. Create a Page Total
      1. 3.7.1. Problem
      2. 3.7.2. Solution
      3. 3.7.3. Discussion
    8. 3.8. Avoid Unwanted Blank Rows on Mailing Labels
      1. 3.8.1. Problem
      2. 3.8.2. Solution
      3. 3.8.3. Discussion
    9. 3.9. Suppress Printing a Report if There Are No Records to Print
      1. 3.9.1. Problem
      2. 3.9.2. Solution
      3. 3.9.3. Discussion
      4. 3.9.4. See Also
    10. 3.10. Print Different Headers or Footers on Odd and Even Pages
      1. 3.10.1. Problem
      2. 3.10.2. Solution
      3. 3.10.3. Discussion
    11. 3.11. Make a Vertical Line the Same Height as a CanGrow/CanShrink Control
      1. 3.11.1. Problem
      2. 3.11.2. Solution
      3. 3.11.3. Discussion
    12. 3.12. Alternate Gray Bars on My Reports
      1. 3.12.1. Problem
      2. 3.12.2. Solution
      3. 3.12.3. Discussion
    13. 3.13. Print Only Records Matching a Form's Filter
      1. 3.13.1. Problem
      2. 3.13.2. Solution
      3. 3.13.3. Discussion
    14. 3.14. Keep a Report from Breaking at an Inappropriate Place
      1. 3.14.1. Problem
      2. 3.14.2. Solution
      3. 3.14.3. Discussion
    15. 3.15. Customize a Report's Grouping and Sorting at Runtime
      1. 3.15.1. Problem
      2. 3.15.2. Solution
      3. 3.15.3. Discussion
  7. 4. Applications
    1. 4.1. Convert Queries into Embedded SQL Statements
      1. 4.1.1. Problem
      2. 4.1.2. Solution
      3. 4.1.3. Discussion
      4. 4.1.4. See Also
    2. 4.2. Build an Object Inventory
      1. 4.2.1. Problem
      2. 4.2.2. Solution
      3. 4.2.3. Discussion
        1. 4.2.3.1. Documenting all the containers
        2. 4.2.3.2. Creating the inventory table
        3. 4.2.3.3. Documenting each container
        4. 4.2.3.4. Avoiding errors
        5. 4.2.3.5. Comments
      4. 4.2.4. See Also
    3. 4.3. Verify That Objects Use Consistent Settings
      1. 4.3.1. Problem
      2. 4.3.2. Solution
      3. 4.3.3. Discussion
        1. 4.3.3.1. Creating the temporary tables and query
        2. 4.3.3.2. Getting ready to document items
        3. 4.3.3.3. Visiting all the objects
        4. 4.3.3.4. Recording property information
        5. 4.3.3.5. Comments
      4. 4.3.4. See Also
    4. 4.4. Hide Access Screen Activity
      1. 4.4.1. Problem
      2. 4.4.2. Solution
      3. 4.4.3. Discussion
        1. 4.4.3.1. Hiding reports in design view
      4. 4.4.4. See Also
    5. 4.5. Find out What Language Version of Access Is Installed
      1. 4.5.1. Problem
      2. 4.5.2. Solution
      3. 4.5.3. Discussion
    6. 4.6. Internationalize Text in Your Applications
      1. 4.6.1. Problem
      2. 4.6.2. Solution
      3. 4.6.3. Discussion
    7. 4.7. Change and Reset the Access Caption Bar
      1. 4.7.1. Problem
      2. 4.7.2. Solution
      3. 4.7.3. Discussion
    8. 4.8. Use the Windows File Open/Save Common Dialogs
      1. 4.8.1. Problem
      2. 4.8.2. Solution
      3. 4.8.3. Discussion
      4. 4.8.4. See Also
    9. 4.9. Clean Test Data out of a Database When You're Ready to Ship It
      1. 4.9.1. Problem
      2. 4.9.2. Solution
      3. 4.9.3. Discussion
      4. 4.9.4. See Also
    10. 4.10. Secure Your Access Database
      1. 4.10.1. Problem
      2. 4.10.2. Solution
      3. 4.10.3. Discussion
  8. 5. Printers
    1. 5.1. Retrieve a List of All the Installed Output Devices
      1. 5.1.1. Problem
      2. 5.1.2. Solution
      3. 5.1.3. Discussion
        1. 5.1.3.1. Adding items to a list box
      4. 5.1.4. See Also
    2. 5.2. Set and Retrieve the Name of the Default Output Device
      1. 5.2.1. Problem
      2. 5.2.2. Solution
      3. 5.2.3. Discussion
    3. 5.3. Programmatically Change Margin and Column Settings for Reports
      1. 5.3.1. Problem
      2. 5.3.2. Solution
      3. 5.3.3. Discussion
    4. 5.4. Programmatically Change Printer Options
      1. 5.4.1. Problem
      2. 5.4.2. Solution
      3. 5.4.3. Discussion
    5. 5.5. Programmatically Control the Paper Source
      1. 5.5.1. Problem
      2. 5.5.2. Solution
      3. 5.5.3. Discussion
    6. 5.6. Retrieve Information About a Report or Form's Selected Printer
      1. 5.6.1. Problem
      2. 5.6.2. Solution
    7. 5.7. Choose an Output Device at Runtime
      1. 5.7.1. Problem
      2. 5.7.2. Solution
      3. 5.7.3. Discussion
    8. 5.8. Find Which Reports Are Not Set to Print to the Default Printer
      1. 5.8.1. Problem
      2. 5.8.2. Solution
      3. 5.8.3. Discussion
  9. 6. Data
    1. 6.1. Save with Each Record the Name of the Last Person Who Edited It and the Date and Time
      1. 6.1.1. Problem
      2. 6.1.2. Solution
      3. 6.1.3. Discussion
      4. 6.1.4. See Also
    2. 6.2. Determine if You're on a New Record in a Form
      1. 6.2.1. Problem
      2. 6.2.2. Solution
      3. 6.2.3. Discussion
    3. 6.3. Find All Records with Names That Sound Alike
      1. 6.3.1. Problem
      2. 6.3.2. Solution
      3. 6.3.3. Discussion
    4. 6.4. Find the Median Value for a Field
      1. 6.4.1. Problem
      2. 6.4.2. Solution
      3. 6.4.3. Discussion
    5. 6.5. Quickly Find a Record in a Linked Table
      1. 6.5.1. Problem
      2. 6.5.2. Solution
      3. 6.5.3. Discussion
    6. 6.6. Get a Complete List of Field Properties from a Table or Query
      1. 6.6.1. Problem
      2. 6.6.2. Solution
      3. 6.6.3. Discussion
      4. 6.6.4. See Also
    7. 6.7. Create and Use Flexible AutoNumber Fields
      1. 6.7.1. Problem
      2. 6.7.2. Solution
      3. 6.7.3. Discussion
    8. 6.8. Back Up Selected Objects to Another Database
      1. 6.8.1. Problem
      2. 6.8.2. Solution
      3. 6.8.3. Discussion
        1. 6.8.3.1. The MultiSelect property
        2. 6.8.3.2. Filling the lboObjects list box
        3. 6.8.3.3. The backup process
        4. 6.8.3.4. Comments
  10. 7. VBA
    1. 7.1. Build Up String References with Embedded Quotes
      1. 7.1.1. Problem
      2. 7.1.2. Solution
      3. 7.1.3. Discussion
    2. 7.2. Create a Global Procedure Stack
      1. 7.2.1. Problem
      2. 7.2.2. Solution
      3. 7.2.3. Discussion
    3. 7.3. Create an Execution Time Profiler
      1. 7.3.1. Problem
      2. 7.3.2. Solution
      3. 7.3.3. Steps
      4. 7.3.4. Discussion
    4. 7.4. Multitask Your VBA Code
      1. 7.4.1. Problem
      2. 7.4.2. Solution
      3. 7.4.3. Discussion
    5. 7.5. Programmatically Add Items to a List or Combo Box
      1. 7.5.1. Problem
      2. 7.5.2. Solution
        1. 7.5.2.1. Filling a list box by calling the AddItem method
        2. 7.5.2.2. Filling a list box by modifying the RowSource property
        3. 7.5.2.3. Filling a list box by creating a list-filling callback function
      3. 7.5.3. Discussion
        1. 7.5.3.1. Calling the AddItem method
        2. 7.5.3.2. Modifying the RowSource property
        3. 7.5.3.3. Creating a list-filling callback function
    6. 7.6. Pass a Variable Number of Parameters to a Procedure
      1. 7.6.1. Problem
      2. 7.6.2. Solution
      3. 7.6.3. Discussion
    7. 7.7. Sort an Array in VBA
      1. 7.7.1. Problem
      2. 7.7.2. Solution
      3. 7.7.3. Discussion
      4. 7.7.4. See Also
    8. 7.8. Fill a List Box with a List of Files
      1. 7.8.1. Problem
      2. 7.8.2. Solution
      3. 7.8.3. Discussion
    9. 7.9. Handle Object Properties, in General
      1. 7.9.1. Problem
      2. 7.9.2. Solution
      3. 7.9.3. Discussion
    10. 7.10. Detect Whether an Object Exists
      1. 7.10.1. Problem
      2. 7.10.2. Solution
      3. 7.10.3. Discussion
      4. 7.10.4. See Also
  11. 8. Optimization
    1. 8.1. Accelerate the Load Time of Forms
      1. 8.1.1. Problem
      2. 8.1.2. Solution
      3. 8.1.3. Discussion
    2. 8.2. Make Slow Forms Run Faster
      1. 8.2.1. Problem
      2. 8.2.2. Solution
        1. 8.2.2.1. Graphic and memo controls
        2. 8.2.2.2. Combo and list box controls
      3. 8.2.3. Discussion
    3. 8.3. Make Combo Boxes Load Faster
      1. 8.3.1. Problem
      2. 8.3.2. Solution
      3. 8.3.3. Discussion
    4. 8.4. Use Jet Engine Optimizations to Speed Up Queries
      1. 8.4.1. Problem
      2. 8.4.2. Solution
      3. 8.4.3. Discussion
    5. 8.5. Accelerate VBA Code
      1. 8.5.1. Problem
      2. 8.5.2. Solution
      3. 8.5.3. Discussion
    6. 8.6. Test the Comparative Benefits of Various Optimization Techniques
      1. 8.6.1. Problem
      2. 8.6.2. Solution
      3. 8.6.3. Discussion
    7. 8.7. Accelerate Multiuser Applications
      1. 8.7.1. Problem
      2. 8.7.2. Solution
      3. 8.7.3. Discussion
      4. 8.7.4. See Also
    8. 8.8. Accelerate Client/Server Applications
      1. 8.8.1. Problem
      2. 8.8.2. Solution
      3. 8.8.3. Discussion
  12. 9. User Interface
    1. 9.1. Create Context-Sensitive Keyboard Shortcuts
      1. 9.1.1. Problem
      2. 9.1.2. Solution
      3. 9.1.3. Discussion
    2. 9.2. Create a Form with No Menu or Toolbar
      1. 9.2.1. Problem
      2. 9.2.2. Solution
      3. 9.2.3. Discussion
    3. 9.3. Create a Geographical Map Interface
      1. 9.3.1. Problem
      2. 9.3.2. Solution
      3. 9.3.3. Discussion
    4. 9.4. Mark a Record on a Form and Return to It Later
      1. 9.4.1. Problem
      2. 9.4.2. Solution
      3. 9.4.3. Discussion
    5. 9.5. Carry Data Forward from Record to Record
      1. 9.5.1. Problem
      2. 9.5.2. Solution
      3. 9.5.3. Discussion
    6. 9.6. Create a Combo Box That Accepts New Entries
      1. 9.6.1. Problem
      2. 9.6.2. Solution
      3. 9.6.3. Discussion
      4. 9.6.4. See Also
    7. 9.7. Create Animated Buttons
      1. 9.7.1. Problem
      2. 9.7.2. Solution
        1. 9.7.2.1. Two-state buttons
        2. 9.7.2.2. Continuously animated buttons
      3. 9.7.3. Discussion
    8. 9.8. Create an Expanding Dialog
      1. 9.8.1. Problem
      2. 9.8.2. Technique
      3. 9.8.3. Discussion
    9. 9.9. Use an ActiveX Control
      1. 9.9.1. Problem
      2. 9.9.2. Solution
        1. 9.9.2.1. Add a bound Calendar control to your form
        2. 9.9.2.2. Create a generic unbound pop-up calendar form
      3. 9.9.3. Discussion
    10. 9.10. Create a Generic, Reusable Status Meter
      1. 9.10.1. Problem
      2. 9.10.2. Solution
        1. 9.10.2.1. Create a generic status meter
        2. 9.10.2.2. Use the generic status meter in your application
      3. 9.10.3. Discussion
  13. 10. Multiuser Applications
    1. 10.1. Properly Secure Your Database
      1. 10.1.1. Problem
      2. 10.1.2. Solution
        1. 10.1.2.1. Make a security plan
        2. 10.1.2.2. Secure your database
        3. 10.1.2.3. Work with the secured database
      3. 10.1.3. Discussion
    2. 10.2. Maintain Multiple Synchronized Copies of the Same Database
      1. 10.2.1. Problem
      2. 10.2.2. Solution
        1. 10.2.2.1. Replicating a database
        2. 10.2.2.2. Synchronizing replicas
        3. 10.2.2.3. Resolving conflicts
      3. 10.2.3. Discussion
    3. 10.3. Create a Transaction Log
      1. 10.3.1. Problem
      2. 10.3.2. Solution
      3. 10.3.3. Discussion
      4. 10.3.4. See Also
    4. 10.4. Send Messages to Other Users Without Using Email
      1. 10.4.1. Problem
      2. 10.4.2. Solution
      3. 10.4.3. Discussion
      4. 10.4.4. See Also
    5. 10.5. Programmatically Track Users and Groups
      1. 10.5.1. Problem
      2. 10.5.2. Solution
      3. 10.5.3. Discussion
    6. 10.6. Adjust an Application Based on Who's Logged In
      1. 10.6.1. Problem
      2. 10.6.2. Solution
      3. 10.6.3. Discussion
    7. 10.7. List All Users with Blank Passwords
      1. 10.7.1. Problem
      2. 10.7.2. Solution
      3. 10.7.3. Discussion
    8. 10.8. Track Which Users Have a Shared Database Open
      1. 10.8.1. Problem
      2. 10.8.2. Solution
      3. 10.8.3. Discussion
    9. 10.9. Determine if a Record Is Locked and by Whom
      1. 10.9.1. Problem
      2. 10.9.2. Solution
      3. 10.9.3. Discussion
    10. 10.10. Set a Maximum Locking Interval for a Record
      1. 10.10.1. Problem
      2. 10.10.2. Solution
      3. 10.10.3. Discussion
  14. 11. Windows APIs
    1. 11.1. Remove a Form's System Menu and Maximize/Minimize Buttons
      1. 11.1.1. Problem
      2. 11.1.2. Solution
      3. 11.1.3. Discussion
    2. 11.2. Flash a Window's Titlebar or Icon
      1. 11.2.1. Problem
      2. 11.2.2. Solution
      3. 11.2.3. Discussion
    3. 11.3. Classify Keypresses in a Language-Independent Manner
      1. 11.3.1. Problem
      2. 11.3.2. Solution
      3. 11.3.3. Discussion
    4. 11.4. Restrict Mouse Movement to a Specific Region
      1. 11.4.1. Problem
      2. 11.4.2. Solution
      3. 11.4.3. Discussion
    5. 11.5. Run Another Program and Pause Until It's Done
      1. 11.5.1. Problem
      2. 11.5.2. Solution
      3. 11.5.3. Discussion
    6. 11.6. Exit Windows Under Program Control
      1. 11.6.1. Problem
      2. 11.6.2. Solution
      3. 11.6.3. Discussion
    7. 11.7. Run the Application Associated with a Data File
      1. 11.7.1. Problem
      2. 11.7.2. Solution
      3. 11.7.3. Discussion
    8. 11.8. Check to See if an Application Is Already Running
      1. 11.8.1. Problem
      2. 11.8.2. Solution
      3. 11.8.3. Discussion
    9. 11.9. Retrieve a List of All Top-Level Windows
      1. 11.9.1. Problem
      2. 11.9.2. Solution
      3. 11.9.3. Discussion
    10. 11.10. Close a Running Windows Application
      1. 11.10.1. Problem
      2. 11.10.2. Solution
      3. 11.10.3. Discussion
    11. 11.11. Set File Date and Time Stamps
      1. 11.11.1. Problem
      2. 11.11.2. Solution
      3. 11.11.3. Discussion
    12. 11.12. Retrieve Information About Available Drives
      1. 11.12.1. Problem
      2. 11.12.2. Solution
      3. 11.12.3. Discussion
    13. 11.13. Collect and Display Information on the System and the Access Installation
      1. 11.13.1. Problem
      2. 11.13.2. Solution
      3. 11.13.3. Discussion
    14. 11.14. Create and Cancel Network Connections Programmatically
      1. 11.14.1. Problem
      2. 11.14.2. Solution
      3. 11.14.3. Discussion
        1. 11.14.3.1. Retrieving information
        2. 11.14.3.2. Adding and canceling connections using common dialogs
        3. 11.14.3.3. Adding and canceling connections with no user intervention
  15. 12. Automation
    1. 12.1. Play an Embedded Sound File from Within an Application
      1. 12.1.1. Problem
      2. 12.1.2. Solution
      3. 12.1.3. Discussion
      4. 12.1.4. See Also
    2. 12.2. Print an Access Report from Excel
      1. 12.2.1. Problem
      2. 12.2.2. Solution
      3. 12.2.3. Discussion
    3. 12.3. Use Excel's Functions from Within Access
      1. 12.3.1. Problem
      2. 12.3.2. Solution
      3. 12.3.3. Discussion
        1. 12.3.3.1. Setting up communication with Excel
        2. 12.3.3.2. Calling simple Excel functions
        3. 12.3.3.3. Calling Excel functions using ranges
        4. 12.3.3.4. Calling Excel functions using arrays
        5. 12.3.3.5. Closing Excel
      4. 12.3.4. Comments
      5. 12.3.5. See Also
    4. 12.4. Perform a Mail Merge from Access to Word
      1. 12.4.1. Problem
      2. 12.4.2. Solution
      3. 12.4.3. Discussion
        1. 12.4.3.1. Starting the connection with Word for Windows
        2. 12.4.3.2. Performing the mail merge
        3. 12.4.3.3. Finishing the mail merge
    5. 12.5. Add an Item to the Startup Group
      1. 12.5.1. Problem
      2. 12.5.2. Solution
        1. 12.5.2.1. Using the sample forms
        2. 12.5.2.2. Using DDE with the Windows shell
      3. 12.5.3. Discussion
        1. 12.5.3.1. Retrieving information from the Windows shell
        2. 12.5.3.2. Executing tasks
        3. 12.5.3.3. Using the wrapper procedures
      4. 12.5.4. Comments
    6. 12.6. Send Access Data to Excel and Create an Excel Chart
      1. 12.6.1. Problem
      2. 12.6.2. Solution
      3. 12.6.3. Discussion
    7. 12.7. Create a PowerPoint Presentation from Access Data
      1. 12.7.1. Problem
      2. 12.7.2. Solution
      3. 12.7.3. Discussion
        1. 12.7.3.1. Starting and stopping PowerPoint
        2. 12.7.3.2. Creating the presentation
        3. 12.7.3.3. Creating each slide
        4. 12.7.3.4. Creating the text
      4. 12.7.4. Comments
    8. 12.8. Add a Contact and Send Email Through Outlook
      1. 12.8.1. Problem
      2. 12.8.2. Solution
      3. 12.8.3. Discussion
      4. 12.8.4. See Also
  16. 13. Data Access Pages
    1. 13.1. Replace Navigation Button Images with Your Own Images
      1. 13.1.1. Problem
      2. 13.1.2. Solution
      3. 13.1.3. Discussion
    2. 13.2. Use Labels or Other Controls for Record Navigation
      1. 13.2.1. Problem
      2. 13.2.2. Solution
    3. 13.3. Change the Text Displayed with a Navigation Control
      1. 13.3.1. Problem
      2. 13.3.2. Solution
    4. 13.4. Create a DAP that Allows You to Update Data
      1. 13.4.1. Problem
      2. 13.4.2. Solution
    5. 13.5. Create One File to Store Connection Information for All DAPs in an Application
      1. 13.5.1. Problem
      2. 13.5.2. Solution
    6. 13.6. Programmatically Change the Connection String for All Pages in a Database
      1. 13.6.1. Problem
      2. 13.6.2. Solution
      3. 13.6.3. Discussion
    7. 13.7. Change the Default Settings for New DAPs
      1. 13.7.1. Problem
      2. 13.7.2. Solution
      3. 13.7.3. Discussion
    8. 13.8. Use Parameters Set in One DAP to Open Another
      1. 13.8.1. Problem
      2. 13.8.2. Solution
      3. 13.8.3. Discussion
  17. 14. SQL Server
    1. 14.1. Dynamically Link SQL Server Tables at Runtime
      1. 14.1.1. Problem
      2. 14.1.2. Solution
      3. 14.1.3. Discussion
    2. 14.2. Dynamically Connect to SQL Server from an ADP
      1. 14.2.1. Problem
      2. 14.2.2. Solution
      3. 14.2.3. Discussion
    3. 14.3. Share an ADP from a Shared Network Folder
      1. 14.3.1. Problem
      2. 14.3.2. Solution
      3. 14.3.3. Discussion
    4. 14.4. Fill the Drop-Down Lists When Using ServerFilterByForm in an ADP
      1. 14.4.1. Problem
      2. 14.4.2. Solution
      3. 14.4.3. Discussion
    5. 14.5. Pass Parameters to Stored Procedures from Pass-Through Queries in an MDB
      1. 14.5.1. Problem
      2. 14.5.2. Solution
      3. 14.5.3. Discussion
    6. 14.6. Pass Parameters to Stored Procedures from an ADP
      1. 14.6.1. Problem
      2. 14.6.2. Solution
      3. 14.6.3. Discussion
    7. 14.7. Use Controls as Parameters for the Row Source of Combo and List Boxes in an ADP
      1. 14.7.1. Problem
      2. 14.7.2. Solution
      3. 14.7.3. Discussion
    8. 14.8. Reference Data from More than One SQL Server Database in an ADP
      1. 14.8.1. Problem
      2. 14.8.2. Solution
      3. 14.8.3. Discussion
    9. 14.9. Use Views to Update Data in an ADP When Users Don't Have Permissions on Tables
      1. 14.9.1. Problem
      2. 14.9.2. Solution
      3. 14.9.3. Discussion
  18. 15. Office Web and SharePoint
    1. 15.1. Work with SharePoint Data from Access
      1. 15.1.1. Problem
      2. 15.1.2. Solution
      3. 15.1.3. Discussion
    2. 15.2. Create a SharePoint Data View Web Part Based on Access Data
      1. 15.2.1. Problem
      2. 15.2.2. Solution
      3. 15.2.3. Discussion
      4. 15.2.4. See Also
    3. 15.3. Conditionally Format a Data View Web Part
      1. 15.3.1. Problem
      2. 15.3.2. Solution
      3. 15.3.3. Discussion
      4. 15.3.4. See Also
    4. 15.4. Create a Master/Detail Page using Data View Web Parts
      1. 15.4.1. Problem
      2. 15.4.2. Solution
      3. 15.4.3. Discussion
      4. 15.4.4. See Also
    5. 15.5. Post Web Form Data to an Access Database
      1. 15.5.1. Problem
      2. 15.5.2. Solution
      3. 15.5.3. Discussion
      4. 15.5.4. See Also
    6. 15.6. Create a Web Frontend to an Access Table Using FrontPage
      1. 15.6.1. Problem
      2. 15.6.2. Solution
      3. 15.6.3. Discussion
        1. 15.6.3.1. Alternatives to FrontPage
        2. 15.6.3.2. When Access won't do the job
      4. 15.6.4. See Also
  19. 16. Smart Tags
    1. 16.1. Use the Built-in Smart Tags
      1. 16.1.1. Problem
      2. 16.1.2. Solution
      3. 16.1.3. Discussion
      4. 16.1.4. See Also
    2. 16.2. Display Multiple Smart Tags on Multiple Forms
      1. 16.2.1. Problem
      2. 16.2.2. Solution
      3. 16.2.3. Discussion
    3. 16.3. Display Smart Tags when Application Starts
      1. 16.3.1. Problem
      2. 16.3.2. Solution
      3. 16.3.3. Discussion
    4. 16.4. Execute a Smart Tag Action Without Displaying the Smart Tag
      1. 16.4.1. Problem
      2. 16.4.2. Solution
      3. 16.4.3. Discussion
    5. 16.5. Create a Smart Tag on a Table in an Access Project
      1. 16.5.1. Problem
      2. 16.5.2. Solution
      3. 16.5.3. Discussion
      4. 16.5.4. See Also
    6. 16.6. Create a Custom Smart Tag to Get a Weather Report
      1. 16.6.1. Problem
      2. 16.6.2. Solution
      3. 16.6.3. Discussion
    7. 16.7. Create a Custom Smart Tag DLL
      1. 16.7.1. Problem
      2. 16.7.2. Solution
        1. 16.7.2.1. Setting up the DLL project
        2. 16.7.2.2. Compiling and registering the DLL project
      3. 16.7.3. Discussion
        1. 16.7.3.1. Working with the Access object model
      4. 16.7.4. See Also
  20. 17. .NET
    1. 17.1. Call a .NET Component from Access
      1. 17.1.1. Problem
      2. 17.1.2. Solution
      3. 17.1.3. Discussion
        1. 17.1.3.1. An alternate solution
        2. 17.1.3.2. Not all .NET components are callable
      4. 17.1.4. See Also
    2. 17.2. Call a .NET Component Containing a Parameterized Constructor
      1. 17.2.1. Problem
      2. 17.2.2. Solution
      3. 17.2.3. Discussion
    3. 17.3. Retrieve Access Data from an ASP.NET Application
      1. 17.3.1. Problem
      2. 17.3.2. Solution
      3. 17.3.3. Discussion
      4. 17.3.4. See Also
    4. 17.4. Call a Web Service from Access
      1. 17.4.1. Problem
      2. 17.4.2. Solution
      3. 17.4.3. Discussion
        1. 17.4.3.1. Calling web services from earlier versions of Access
        2. 17.4.3.2. Locating the toolkits
      4. 17.4.4. See Also
    5. 17.5. Work with a Web Service that Returns a DataSet
      1. 17.5.1. Problem
      2. 17.5.2. Solution
      3. 17.5.3. Discussion
        1. 17.5.3.1. Processing the returned XML
      4. 17.5.4. See Also
    6. 17.6. Print an Access Report from .NET Windows Form Application
      1. 17.6.1. Problem
      2. 17.6.2. Solution
      3. 17.6.3. Discussion
        1. 17.6.3.1. Shutting down Access
        2. 17.6.3.2. Communicating parameters to Access
        3. 17.6.3.3. Interop assemblies
      4. 17.6.4. See Also
  21. 18. XML
    1. XML Overview
      1. The XML file
        1. Root elements and namespaces
        2. Attributes
        3. Extensible Stylesheet Language Transformations (XSLT)
        4. XML Schema Definition (XSD)
    2. 18.1. Import XML Structured as Elements
      1. 18.1.1. Problem
      2. 18.1.2. Solution
      3. 18.1.3. Discussion
      4. 18.1.4. See Also
    3. 18.2. Import XML into Existing Tables
      1. 18.2.1. Problem
      2. 18.2.2. Solution
      3. 18.2.3. Discussion
    4. 18.3. Import XML Using a Schema (XSD)
      1. 18.3.1. Problem
      2. 18.3.2. Solution
      3. 18.3.3. Discussion
      4. 18.3.4. See Also
    5. 18.4. Export XML
      1. 18.4.1. Problem
      2. 18.4.2. Solution
        1. 18.4.2.1. Exporting all of the data in related tables
        2. 18.4.2.2. Exporting the data from a query
      3. 18.4.3. Discussion
    6. 18.5. Exporting Selected Columns to an HTML Table
      1. 18.5.1. Problem
      2. 18.5.2. Solution
      3. 18.5.3. Discussion
      4. 18.5.4. See Also
    7. 18.6. Export Unrelated Tables
      1. 18.6.1. Problem
      2. 18.6.2. Solution
      3. 18.6.3. Discussion
    8. 18.7. Export Using a Where Clause
      1. 18.7.1. Problem
      2. 18.7.2. Solution
      3. 18.7.3. Discussion
    9. 18.8. Export a Report
      1. 18.8.1. Problem
      2. 18.8.2. Solution
        1. 18.8.2.1. Exporting to HTML
        2. 18.8.2.2. Exporting to ASP
      3. 18.8.3. Discussion
        1. 18.8.3.1. Dissecting the HTML
        2. 18.8.3.2. Dissecting the ASP
      4. 18.8.4. See Also
  22. Index
  23. About the Authors
  24. Colophon
  25. Copyright