CARVIEW |
Access Cookbook, Second Edition
Solutions to Common User Interface & Programming Problems
- By
- Ken Getz, Paul Litwin, Andy Baron
- Publisher:
- O'Reilly Media
- Released:
- March 2004
- Pages:
- 840
Product Editions
- Access Cookbook, Second Edition - March 2004
- Access Cookbook - February 2002
Access power users and programmers at all levels will rely on the Access Cookbook, Second Edition for quick solutions to gnarly problems. Fully updated for Access 2003, it's also one of the first books to thoroughly explore new support for .NET managed code and XML. All of the examples have been tested for compatibility with Access 2003, Windows XP, and Windows Server 2003. This new edition also covers Access with SharePoint, SmartTags, .NET; and XML.
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.
-
Chapter 1 Queries
-
Specify Query Criteria at Runtime
-
Using a Form-Based Parameter Query
-
Limit the Items in One Combo Box Based on the Selected Item in Another
-
Make Formatted Date Columns Sort Correctly in a Crosstab Query
-
Group Mailing Labels by Address
-
Use a Field in One Table to Update a Field in Another Table
-
Use a VBA Variable to Filter a Query
-
Use a Query to Retrieve a Random Set of Rows
-
Create a Query That Will Show Aging of Receivables
-
Create a Join That's Based on a Comparison Other than Equality
-
Create a Query to Combine Data from Two Tables with Similar Structures
-
Create a Combo Box That Allows a User to Select N/A
-
Use a Query to Show the Relationship Between Employees and Supervisors
-
Create a Query That Uses Case-Sensitive Criteria
-
Use a Query to Create a New Table Complete with Indexes
-
Save My Queries in a Table for Better Programmatic Access and Security
-
Create a Recordset Based on a Parameter Query from VBA Code
-
-
Chapter 2 Forms
-
Make Custom Templates for Forms and Reports
-
Highlight the Current Field in Data-Entry Forms
-
Restrict the User to a Single Row on a Form
-
Use an Option Group to Collect and Display Textual Information
-
Display Multiple Pages of Information on One Form
-
Provide Record Navigation Buttons on a Form
-
Size a Form's Controls to Match the Form's Size
-
Make a Simple "Searching" List Box
-
Create a Replacement for Access's InputBox
-
Store the Sizes and Locations of Forms
-
Open Multiple Instances of a Form
-
-
Chapter 3 Reports
-
Create a Report with Line Numbers
-
Print the Value of a Parameter on a Report
-
Create a Report with Multiple Columns
-
Print a Message on a Report if Certain Conditions Are Met
-
Create a Page-Range Indicator on Each Page
-
Create a Simple Bar Graph on a Report
-
Create a Page Total
-
Avoid Unwanted Blank Rows on Mailing Labels
-
Suppress Printing a Report if There Are No Records to Print
-
Print Different Headers or Footers on Odd and Even Pages
-
Make a Vertical Line the Same Height as a CanGrow/CanShrink Control
-
Alternate Gray Bars on My Reports
-
Print Only Records Matching a Form's Filter
-
Keep a Report from Breaking at an Inappropriate Place
-
Customize a Report's Grouping and Sorting at Runtime
-
-
Chapter 4 Applications
-
Convert Queries into Embedded SQL Statements
-
Build an Object Inventory
-
Verify That Objects Use Consistent Settings
-
Hide Access Screen Activity
-
Find out What Language Version of Access Is Installed
-
Internationalize Text in Your Applications
-
Change and Reset the Access Caption Bar
-
Use the Windows File Open/Save Common Dialogs
-
Clean Test Data out of a Database When You're Ready to Ship It
-
Secure Your Access Database
-
-
Chapter 5 Printers
-
Retrieve a List of All the Installed Output Devices
-
Set and Retrieve the Name of the Default Output Device
-
Programmatically Change Margin and Column Settings for Reports
-
Programmatically Change Printer Options
-
Programmatically Control the Paper Source
-
Retrieve Information About a Report or Form's Selected Printer
-
Choose an Output Device at Runtime
-
Find Which Reports Are Not Set to Print to the Default Printer
-
-
Chapter 6 Data
-
Save with Each Record the Name of the Last Person Who Edited It and the Date and Time
-
Determine if You're on a New Record in a Form
-
Find All Records with Names That Sound Alike
-
Find the Median Value for a Field
-
Quickly Find a Record in a Linked Table
-
Get a Complete List of Field Properties from a Table or Query
-
Create and Use Flexible AutoNumber Fields
-
Back Up Selected Objects to Another Database
-
-
Chapter 7 VBA
-
Build Up String References with Embedded Quotes
-
Create a Global Procedure Stack
-
Create an Execution Time Profiler
-
Multitask Your VBA Code
-
Programmatically Add Items to a List or Combo Box
-
Pass a Variable Number of Parameters to a Procedure
-
Sort an Array in VBA
-
Fill a List Box with a List of Files
-
Handle Object Properties, in General
-
Detect Whether an Object Exists
-
-
Chapter 8 Optimization
-
Accelerate the Load Time of Forms
-
Make Slow Forms Run Faster
-
Make Combo Boxes Load Faster
-
Use Jet Engine Optimizations to Speed Up Queries
-
Accelerate VBA Code
-
Test the Comparative Benefits of Various Optimization Techniques
-
Accelerate Multiuser Applications
-
Accelerate Client/Server Applications
-
-
Chapter 9 User Interface
-
Create Context-Sensitive Keyboard Shortcuts
-
Create a Form with No Menu or Toolbar
-
Create a Geographical Map Interface
-
Mark a Record on a Form and Return to It Later
-
Carry Data Forward from Record to Record
-
Create a Combo Box That Accepts New Entries
-
Create Animated Buttons
-
Create an Expanding Dialog
-
Use an ActiveX Control
-
Create a Generic, Reusable Status Meter
-
-
Chapter 10 Multiuser Applications
-
Properly Secure Your Database
-
Maintain Multiple Synchronized Copies of the Same Database
-
Create a Transaction Log
-
Send Messages to Other Users Without Using Email
-
Programmatically Track Users and Groups
-
Adjust an Application Based on Who's Logged In
-
List All Users with Blank Passwords
-
Track Which Users Have a Shared Database Open
-
Determine if a Record Is Locked and by Whom
-
Set a Maximum Locking Interval for a Record
-
-
Chapter 11 Windows APIs
-
Remove a Form's System Menu and Maximize/Minimize Buttons
-
Flash a Window's Titlebar or Icon
-
Classify Keypresses in a Language-Independent Manner
-
Restrict Mouse Movement to a Specific Region
-
Run Another Program and Pause Until It's Done
-
Exit Windows Under Program Control
-
Run the Application Associated with a Data File
-
Check to See if an Application Is Already Running
-
Retrieve a List of All Top-Level Windows
-
Close a Running Windows Application
-
Set File Date and Time Stamps
-
Retrieve Information About Available Drives
-
Collect and Display Information on the System and the Access Installation
-
Create and Cancel Network Connections Programmatically
-
-
Chapter 12 Automation
-
Play an Embedded Sound File from Within an Application
-
Print an Access Report from Excel
-
Use Excel's Functions from Within Access
-
Perform a Mail Merge from Access to Word
-
Add an Item to the Startup Group
-
Send Access Data to Excel and Create an Excel Chart
-
Create a PowerPoint Presentation from Access Data
-
Add a Contact and Send Email Through Outlook
-
-
Chapter 13 Data Access Pages
-
Replace Navigation Button Images with Your Own Images
-
Use Labels or Other Controls for Record Navigation
-
Change the Text Displayed with a Navigation Control
-
Create a DAP that Allows You to Update Data
-
Create One File to Store Connection Information for All DAPs in an Application
-
Programmatically Change the Connection String for All Pages in a Database
-
Change the Default Settings for New DAPs
-
Use Parameters Set in One DAP to Open Another
-
-
Chapter 14 SQL Server
-
Dynamically Link SQL Server Tables at Runtime
-
Dynamically Connect to SQL Server from an ADP
-
Share an ADP from a Shared Network Folder
-
Fill the Drop-Down Lists When Using ServerFilterByForm in an ADP
-
Pass Parameters to Stored Procedures from Pass-Through Queries in an MDB
-
Pass Parameters to Stored Procedures from an ADP
-
Use Controls as Parameters for the Row Source of Combo and List Boxes in an ADP
-
Reference Data from More than One SQL Server Database in an ADP
-
Use Views to Update Data in an ADP When Users Don't Have Permissions on Tables
-
-
Chapter 15 Office Web and SharePoint
-
Work with SharePoint Data from Access
-
Create a SharePoint Data View Web Part Based on Access Data
-
Conditionally Format a Data View Web Part
-
Create a Master/Detail Page using Data View Web Parts
-
Post Web Form Data to an Access Database
-
Create a Web Frontend to an Access Table Using FrontPage
-
-
Chapter 16 Smart Tags
-
Use the Built-in Smart Tags
-
Display Multiple Smart Tags on Multiple Forms
-
Display Smart Tags when Application Starts
-
Execute a Smart Tag Action Without Displaying the Smart Tag
-
Create a Smart Tag on a Table in an Access Project
-
Create a Custom Smart Tag to Get a Weather Report
-
Create a Custom Smart Tag DLL
-
-
Chapter 17 .NET
-
Call a .NET Component from Access
-
Call a .NET Component Containing a Parameterized Constructor
-
Retrieve Access Data from an ASP.NET Application
-
Call a Web Service from Access
-
Work with a Web Service that Returns a DataSet
-
Print an Access Report from .NET Windows Form Application
-
-
Chapter 18 XML
-
XML Overview
-
Import XML Structured as Elements
-
Import XML into Existing Tables
-
Import XML Using a Schema (XSD)
-
Export XML
-
Exporting Selected Columns to an HTML Table
-
Export Unrelated Tables
-
Export Using a Where Clause
-
Export a Report
-
-
Colophon

- Title:
- Access Cookbook, Second Edition
- By:
- Ken Getz, Paul Litwin, Andy Baron
- Publisher:
- O'Reilly Media
- Formats:
-
- Ebook
- Safari Books Online
- Print Release:
- March 2004
- Ebook Release:
- February 2009
- Pages:
- 840
- Print ISBN:
- 978-0-596-00678-5
- | ISBN 10:
- 0-596-00678-0
- Ebook ISBN:
- 978-0-596-10441-2
- | ISBN 10:
- 0-596-10441-3
-
Ken Getz
Ken Getz is a senior consultant with MCW Technologies and splits his time between programming, writing, and training. He specializes in tools and applications written in Visual Studio .NET and Visual Basic. Ken is co-author of best-selling several books, including Access 2002 Developer's Handbooks with Paul Litwin and Mike Gunderloy, Visual Basic Language Developer's Handbook with Mike Gilbert, and VBA Developer's Handbook with Mike Gilbert (Sybex). He co-wrote several training courses for Application Developer's Training Company (www.appdev.com), including VB.NET, ASP.NET, Access 2000 and 97, Visual Basic 6, and Visual Basic 5 seminars.He has also recorded video training for AppDev covering VB.NET, ASP.NET, VB6, Access 2000, and Access 97. Ken is a frequent speaker at technical conferences and spoken often at Microsoft's Tech-Ed conference. Ken's also a technical editor for Access-VB-SQL Advisor magazine and a columnist for Informant Publications' asp.netPRO magazine.
-
Paul Litwin
Paul Litwin is the president of Litwin Consulting, providing development, mentoring, and training in ASP, ASP.NET, Visual Basic, SQL Server, XML, Microsoft Access, and related technologies. Paul was the founding editor of the Smart Access Newsletter and recently became the editor-in-chief of asp.netPRO Magazine(www.aspnetpro.com). He is the author of a number of books, articles, and training materials on Access, VBA, Web development, ASP, and ASP.NET. Paul is one of the founders of Deep Training, a developer-owned training company providing training on Microsoft.NET (www.deeptraining.com). He is the conference chair of Microsoft ASP.NET Connections (www.asp-connections.com) and Office Developer Connections (www.msofficeconnections.com) and speaks regularly at other industry events, including Microsoft TechEd and Microsoft Office Deployment and Development Conference.
-
Andy Baron
Andy Baron is a senior consultant at MCW Technologies, a Microsoft MVP (Most Valuable Professional) since 1995, and a contributing editor for Advisor Media and Pinnacle Publications. Andy is co-author of the Microsoft Access Developers Guide to SQL Server (Sams), and he writes and presents courseware for Application Developers Training Co.
Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animal on the cover of Access Cookbook, Second Edition is a northern tamandua. The tamandua is also known as the collared, or lesser, anteater. There are two species of tamandua: the northern tamandua (Tamandua mexicana), found in Central America and the northwestern part of South America; and the southern tamandua (Tamandua tetradactyla), which can be found further south. Tamanduas have coarse, yellowish, or brownish fur with black markings and are about half the size of their rarer relatives, the giant anteaters (Myrmecophaga tridactyla). They can grow to be about 60 centimeters long, with a prehensile tail of approximately the same length, and reach weights of 6 to 13 pounds.
Tamanduas are occasionally found on the ground, but they prefer living in the trees, where they hunt for ant and termite nests. Like all anteaters, tamanduas have long snouts and extremely long tongues that they use to collect and eat their prey. Since no teeth are necessary for this kind of meal, anteaters' teeth have been reduced during their evolution. However, unlike the completely toothless giant anteaters, tamanduas still have some small teeth remaining (which are useful for consuming the fruits that supplement their diets). They use the sharp claws on their front paws to open ant and termite nests, but they are careful to not destroy the nests completely and take just a small portion of the colony before they go for the next nest. This strategy preserves the colonies for future feedings. Tamanduas are primarily active during the night and sleep through the day in hollow trees or the forks of trees, securing themselves by wrapping their tails around branches. Reg Aubry was the production editor and copyeditor for Access Cookbook, Second Edition. Darren Kelly, Genevieve d'Entremont, and Claire Cloutier provided quality control. Julie Hawks wrote the index.
Ellie Volckhausen designed the cover of this book, based on a series design by Edie Freedman. The cover image is a 19th-century engraving from Cuvier's Animals. Emma Colby produced the cover layout with QuarkXPress 4.1 using Adobe's ITC Garamond font. David Futato designed the CD-ROM label.
David Futato designed the interior layout. Julie Hawks converted the files from Microsoft Word to FrameMaker 5.5.6 using tools created by Mike Sierra. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSans Mono Condensed. The illustrations that appear in the book were produced by Robert Romano and Jessamyn Read using Macromedia Free-Hand 9 and Adobe Photoshop 6. The tip and warning icons were drawn by Christopher Bing. This colophon was written by Rachel Wheeler.
![]() ©2010, O'Reilly Media, Inc. (707) 827-7000 / (800) 998-9938 All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners. |
|