This is an idea book. It's a compendium of solutionsand suggestions devoted to making your work with Microsoft Accessmore productive. If you're using Access and youaspire to create database applications that are more thanwizard-created clones of every other database application, this isthe book for you.
If, on the other hand, you're looking for a bookthat shows you how to create a form, or how to write your firstVisual Basic for Applications (VBA) function, or how to use theCrosstab Query Wizard, this may not be the bookyou need. For those kinds of things, we recommend one of the manyAccess books geared toward the first-time user.
Promotes Creative Use of the Product
Ratherthan rehashing the manuals, Access Cookbook offers you solutions to problems you may have already encountered,have yet to encounter, or perhaps have never even considered. Some ofthe issues discussed in this book are in direct response to questionsposted in the Microsoft Access newsgroups online (at news://msnews.microsoft.com ); others areproblems we've encountered while developing our ownapplications. In any case, our goal is to show you how to push theedges of the product, making it do things you might not even havethought possible.
For example, you'll learn how to create a query thatjoins tables based on some condition besides equality, how to size aform's controls to match the form'ssize, how to store and retrieve the locations and sizes of forms fromsession to session, and how to create a page-range indicator on everyreport page. You'll see how to use some of thecommon Windows dialogs from your Access application, how tointernationalize your messages, how to really control your printer, and how to store the username and date lastedited for each row. There are tips for securing your database,filling list boxes a number of different ways, and optimizing yourapplications. You'll find details on using Access inmultiuser environments, creating transaction logs, adjusting databaseoptions depending on who's logged in, andprogrammatically keeping track of users and groups. There areinstructions for using the Windows API to restrict mouse movement toa specific area of a form, exiting Windows under program control, andchecking the status of and shutting down another Windows application.You'll see how, using COM and Automation, you canuse Access together with other applications such as Word, Excel,PowerPoint, and Outlook.
If you've never tried data access pages (DAPs),you're in for a treatthis feature makes itsimple for you to display and edit data using a web browser.You'll learn enough to really get you started withthis exciting technology, and you'll learn solutionsto common but tricky problems. You'll find tips andtechniques for using Access and SQL Server together, taking advantageof Access Data Projects (ADPs). You'll learn howsmart tags have been implemented in Access 2003, and how to createyour own smart tags. And you'll also see how you howAccess allows you to work with XML data. You'llexplore how to work with SharePoint lists from within Access as wellas how to use SharePoint and FrontPage to publish Access data on theInternet or an intranet. Finally, you'll discoverhow easy it is to interoperate with Microsoft .NET from Access,learning both how to call .NET programs and Web services from Accessand how to work with Access data and reports from .NET programs.
Youwon't, however, find that this book pushes you intousing new technology just because it's new. Many ofthe techniques in this book are "oldchestnuts" that Access developers have used foryears to solve common problems. Most of the VBA code that performsdata manipulation chiefly uses the older technology, DAO, rather thanthe newer ADO, because DAO is still the most efficient way to workwith Access data. When ADO provides a better approach to solving aparticular problem, you'll learn how to use it forthat purpose. For example, you'll learn how you canuse an ADO recordset to retrieve a list of all the users logged on toyour applicationsomething that was never possible with DAO.
Uses the Tools at Hand
This book focuses on using the right tool for each problem. Somesolutions here require no programming, while others require a little(or a lot) of VBA coding. Sometimes even plain VBA codeisn't sufficient, and you'll needto use the Windows API or other available code libraries. In eachcase, we've tried to make the implementation of thetechnique as simple, yet generic, as possible.
We did, however, decide to focus thedata access features of this book squarely on using the Jet databaseengine (instead of SQL Server). There are several reasons why we madethis choice, but first and foremost is that most Access developersstill prefer the convenience and simplicity of using Jet. The Jetdatabase engine remains a cost-effective and capable solution fordatabase applications used by small workgroups, which make up thevast majority of the Access user base. Most of the techniquesdescribed in this book, however, will work just as effectively withdata from SQL Server or from other ODBC data sources, even if theexample uses a Jet database. And if you are working with non-Accessdata sources, you'll find plenty of tips focused onhelping you do so more efficiently.
Follows a Problem-Solution Format
The structure of this book is simple. The chapters are arranged bycategories: queries, forms, reports, application design, printing,data manipulation, VBA, optimization, user interface, multiuser,Windows API, Automation, DAPs, and SQL Server applications. Eachsection consists of a single problem and its solution, followed by adiscussion. Each solution contains a sample database (e.g., 01-01.MDB ) with complete construction details,indicating which modules you'll need to import, whatcontrols you'll need to create, and what eventsyou'll need to handle. In one case, Recipe 4-10, anyMDB file used elsewhere in the chapter will do. To use certainChapter 14 examples, you will need to be connected to either theNorthwind or Pubs databases that ship with SQL Server. All the code,bitmaps, sample data, and necessary tools are included with theCD-ROM that accompanies this book. (CD content is available online athttp://examples.oreilly.com/accesscook.)
Who This Book Is For
You don't have to be a VBA whiz to use this book.It's designed for all levels of readers: end users,power users, and developers.