home   Java Script   MS Access   Perl   HTML   Delphi   C ++   Visual Basic   Java   CGIPerl   MS Excel   Front Page 98   Windows 98   Ms Word   Builder   PHP   Assembler     Link to us   Links    


TOC Index Next Page Home

Alison Balter's Mastering Access 95 Development

Alison Balter

Sams Publishing, 201 West 103rd Street, Indianapolis, Indiana 46290

To my incredible husband Dan. How lucky I am to have someone so special in my life, let alone as my husband. You are my partner in every respect of the word. You are my best friend, my lover, my everything. You are the wind beneath my wings.

Thank you for being the phenomenal person that you are. Without you, the vision of this book would never have become a reality. I look forward to sharing not only our successes, but the beautiful life of the child that we have created, and who will be born around the time that this book is printed. There is no one I'd rather spend forever with than you.

Copyright 1996 by Sams Publishing

PREMIER EDITION

All rights reserved. No part of this book shall be reproduced, stored in a retrieval system, or transmitted by any means, electronic, mechanical, photocopying, recording, or otherwise, without written permission from the publisher. No patent liability is assumed with respect to the use of the information contained herein. Although every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions. Neither is any liability assumed for damages resulting from the use of the information contained herein. For information, address Sams Publishing, 201 W. 103rd St., Indianapolis, IN 46290.

International Standard Book Number: 0-672-30944-0

Library of Congress Catalog Card Number: 96-67969

99 98 97 96................................4 3 2 1

Interpretation of the printing code: the rightmost double-digit number is the year of the book's printing; the rightmost single-digit, the number of the book's printing. For example, a printing code of 96-1 shows that the first printing of the book occurred in 1996.

Composed in AGaramond and MCPdigital by Macmillan Computer Publishing

Printed in the United States of America

All terms mentioned in this book that are known to be trademarks or service marks have been appropriately capitalized. Sams Publishing cannot attest to the accuracy of this information. Use of a term in this book should not be regarded as affecting the validity of any trademark or service mark. Access is a registered trademark of Microsoft Corporation.

Publisher and President:

Richard K. Swadley

Acquisitions Manager:

Greg Wiegand

Development Manager:

Dean Miller

Managing Editor:

Cindy Morrow

Marketing Manager:

John Pierce

Assistant Marketing Manager:

Kristina Perry

Acquisitions Editor

Grace M. Buechlein

Development Editor

Michael Watson

Software Development Specialist

Cari Skaggs

Production Editor

Ryan Rader

Copy Editors

Nancy Albright
David Bradford
Karen Letourneau

Technical Reviewers

Ricardo Birmele
Chris Capossela
Karen Jaskolka

Editorial Coordinator

Bill Whitmer

Technical Edit Coordinator

Lynette Quinn

Resource Coordinator

Deborah Frisby

Formatter

Frank Sinclair

Editorial Assistants

Carol Ackerman
Andi Richter
Rhonda Tinch-Mize

Cover Designer

Tim Amrhein

Book Designer

Alyssa Yesh

Copy Writer

Peter Fuller

Production Team Supervisor

Brad Chinn

Overview

Introduction

Part 1

Building a Foundation For Your Access Applications

1

Introduction to Access Development

2

A Strategy For Developing Access Applications

3

What Every Developer Needs to Know About Tables

4

Relationships: Your Key to Data Integrity

5

What Every Developer Needs to Know About Query Basics

6

What Every Developer Needs to Know About Form Basics

7

What Every Developer Needs to Know About Report Basics

Part II

Utilizing VBA to Build Powerful Applications

8

VBA 101: The Basics of VBA

9

Advanced VBA Techniques

10

The Real Scoop on Objects, Properties, and Events

11

What Are Macros and When Do You Need Them?

12

Advanced Query Concepts

13

Let's Get More Intimate with Forms: Advanced Techniques

14

Let's Get More Intimate with Reports: Advanced Techniques

15

What Are Data Access Objects and Why Are They Important?

Part III

What to Do When Things Don't Go As Planned

16

Debugging: Your Key to Successful Development

17

Handling Those Dreaded Runtime Errors

Part IV

Preparing Your Applications for a Multiuser Environment

18

Developing for a Multiuser Environment

19

Utilizing External Data

20

Client/Server Techniques

21

Client/Server Strategies

22

Transaction Processing

23

Optimizing Your Application

24

Replication Made Easy

Part V

Extending the Power of Access

25

OLE: Communicating with Other Applications

26

Using OLE Controls

27

Leveraging Your Application: Creating Your Own Libraries

28

Working with and Creating Add-Ins, Wizards, and Builders

29

External Functions: The Windows API

Part VI

Putting the Final Polish on Your Application

30

Database Security Made Easy

31

Complex Security Issues

32

Documenting Your System

33

Database Maintenance Techniques

34

Developing a Help File

35

Distributing Your Application

A

Table Structures

B

Naming Conventions


Acknowledgments

Writing a book is a monumental task. Without the support and understanding of those close to me, my dreams for this book would never have come to fruition. Special thanks goes to the following special people who helped to make this book possible:

Dan Balter (my incredible husband) for his ongoing support, love, encouragement, and friendship, and for staying up many nights proofreading this book. Dan, words cannot adequately express the love and appreciation that I feel for all that you are and all that you do for me.

Charlotte and Bob Roman (Mom and Dad) for believing in me and sharing in both the good times and the bad. Mom and dad, without your special love and support, I never would have become who I am today.

Maureen and Herb Balter (Mom- and Dad-in-law) for their willingness to be the Mother- and Father-in-law that I missed for so long—and most of all, for accepting and appreciating me for who I am! Mom and Dad, your excitement about my writing endeavors makes all of the hard work seem so much more worthwhile.

Grace Buechlein for her personal touch, understanding, encouragement and support. Grace, I can't tell you how much your friendly voice and genuine care helped to carry me through the rough and frustrating times. You are more than an Acquisitions Editor. You are a friend!

Michael Watson for his perpetual willingness to look at things in a different way from his own. Michael, I know that we didn't always see eye to eye on everything. It takes a special Development Editor to trust and believe in an author's artistic expression.

Chris Capossela for his great tech editing. Chris, I really enjoy working with you. You have a great way of commending me when I am right on, and gently letting me know when I have gone off track.

John Hawkins, Jeanne Banfield, Mike Groh, Geri Bahr, Dana Gardner, and all the rest of Advisor Publications' wonderful staff for giving me a chance as an author. I enjoy both the professional and personal relationships that I have developed with all of you. Thanks for believing in me!

Sue Terry for her understanding of my busy life and her incessant attempts to make time for me in hers. Sue, most of all, I want to thank you for your unconditional love and willingness to accept me for who I am.

Greggory Peck, Clint Argle, and the Folks at Keystone Learning Systems for their contributions to my success and for their patience while I completed another book when Keystone KeyNotes were once again overdue! You guys mean the world to me.

Paul Sheriff for inspiring and encouraging me to reach my potential as a trainer and developer. Paul, you are a special friend. I appreciate all that you have taught me as a friend rather than a competitor.

About the Author

Alison Balter is the president of Marina Consulting Group, a firm based in Thousand Oaks, California. Alison is a highly experienced independent trainer and consultant, specializing in Windows applications training and development. During her thirteen years in the computer industry, she has trained and consulted with many corporations and government agencies. Since Alison founded Marina Consulting Group in 1990, its client base has expanded to include major corporations and government agencies such as Northrop, the Drug Enforcement Administration, Prudential Insurance, Transamerica Insurance, Fox Broadcasting, the United States Navy, and others.

Alison is a Microsoft Solution Provider and Certified Professional. Most recently, she became one of the first professionals in the computer industry to become a Microsoft Certified Solutions Developer.

Alison is the author of over 75 internationally marketed computer training videos for KeyStone Learning Systems Corporation, including seven Access 2.0 videos, 10 Access 95 videos, six Visual Basic for Applications videos, and seven Visual FoxPro videos. She travels throughout North America giving training seminars in Microsoft Access, Visual Basic, and Visual FoxPro.

Alison is a regular contributing columnist for the Advisor magazines, as well as other computer publications. She is also a regular on the Access and Visual Basic national speaker circuit. She is one of four speakers on the Visual Basic 4.0 World Tour, a seminar series co-sponsored by Application Developers Training Company and Microsoft.

Alison is also a co-author of two other Access books published by Sams: Essential Access 95 and Access 95 Unleashed.

An active participant in many user groups and other organizations, Alison is a past president of the Independent Computer Consultants Association of Los Angeles, and of the Los Angeles Clipper Users' Group.

On a personal note, Alison enjoys traveling, skiing, flying, parasailing, hiking, and dancing. She loves spending time with her husband, Dan, and their dog, Reggie. She is expecting her first child around the time that this book will hit the bookstores.

Alison's company, Marina Consulting Group, is available for consulting work and on-site training in Microsoft Access, Visual Basic, and Visual FoxPro, as well as Windows NT and Windows 95 networking. Contact Marina Consulting Group by phone at (805)497-6100, by electronic mail on CompuServe at 70372,3707, or via the Internet at 70372.3707@compuserve.com.

Introduction

Many excellent books about Access 95 are available. So why write another one? In talking to the many students that I meet in my travels around the country, I have heard one common complaint. Instead of the several great books available for the user community or the host of wonderful books available for expert Access developers, my students yearn for a book targeted toward the intermediate to advanced developer. They yearn for a book that starts at the beginning, ensures that they have no gaps in their knowledge, and takes them through some of the most advanced aspects of Access development. Along the way, they want to be provided with volumes of practical code that they can easily port into their own applications. Mastering Access 95 Development is specifically written with those requests in mind.

This book begins by providing you with an introduction to Access development. It alerts you to the types of applications that can be developed in Access and introduces you to the components of an Access application. After you understand what an Access application is and when it is appropriate to develop one, you explore the steps involved in building an actual Access application. Several strategies are covered before the first application component is built. This ensures that you, as the developer of the application, are aware of the design issues that might affect you in your particular environment.

After you have discovered the overall picture, you are ready to venture into the specific details of each object within an Access database. Chapters 3 through 7 cover the basics of tables, relationships, queries, forms, and reports. These chapters are intended to provide you with an approach to developing these database objects from a developer's perspective. Although this text starts at the beginning, it provides you with many tips, tricks, and caveats not readily apparent from the documentation or from books targeted towards end-users.

When you have a strong foundation of knowledge on how to build tables, queries, forms, and reports, you are ready to plunge into coding full-force. Chapters 8 through 10 provide you with an extremely strong grasp of the VBA language. Once again, starting with the basics, you are gently taken to the most complex intricacies of the VBA language and Access object model. Many practical examples are provided in the text to ensure that you thoroughly digest each topic.

Chapter 11 introduces you to macros. Because this book is targeted toward developers, this chapter is the only one in which macros are discussed. The chapter focuses on why you as a developer might opt or need to use macros to complete certain tasks.

Chapters 12 through 14 provide you with an advanced discussion of queries, forms, and reports. By the time you reach this point in the text, you should be familiar with all of the basics of creating database objects. These chapters combine the basics of table, query, form, and report design with the VBA and object techniques covered in Chapters 8 through 10. The power techniques covered in Chapters 12 through 14 provide you with the expertise that you need in order to design the most complex types of queries, forms, and reports required by your applications.

Before you are ready to ride through the frontier of the many intricacies of the Access development environment, one basic topic remains. Chapter 15 introduces you to data access objects. After reading Chapter 15, you will see how you can move away from bound objects, manipulating the data within your database using code.

Unfortunately, things don't always go as planned. No matter what your level of expertise, you will often find yourself stumped over a piece of code and looking for answers. Chapter 16 shows you how to effectively employ the debugger to solve any coding problem that you might have. Every aspect of the debugger is covered in the chapter. Even after your application has been thoroughly debugged, you still must responsibly provide a means by which errors are handled within your application. Chapter 17 shows you everything you need to know to implement error handling within your application. Included in the text and on the sample code CD-ROM is a generic error handler that you can easily build into any of your own applications.

With the foundation provided by the first 17 chapters, you are ready to move into the more rich and complex aspects of the VBA language and the Access development environment. Chapters 18 through 24 cover all aspects of developing applications for a multiuser or client/server environment. You explore locking strategies, how to interact with non-native Access file formats, and how to utilize ODBC to design client/server applications. Transaction processing, application optimization, and replication are also covered in these chapters.

As an Access developer, your world is not limited to just Access. To be effective and productive as an Access developer, you must know how to interact with other applications and how to utilize OLE controls, libraries, menu add-ins, wizards, and builders to assist you with the application development process. Chapters 25 through 29 cover OLE, library and add-in techniques, and the Windows API. After reading these chapters you will understand how to employ the use of external objects and functionality to add richness to your applications without too much effort on your part.

At last, you are ready to put the final polish on your application. Chapters 30 through 35 cover security, documentation, maintenance, help, and distribution. You learn how to properly secure your application so that the investment you have put into the application development process is not compromised in any way. You also discover how easy it is to put into your application the final touches that provide it with a professional polish and make it stand out from the rest.

The Access development environment is robust and exciting. With the keys to deliver all that it offers, you can produce applications that provide you with much satisfaction as well as many financial rewards. After poring over this hands-on guide and keeping it nearby for handy reference, you too can become masterful at Access 95 development. This book is dedicated to demonstrating how you can fulfill the promise of making Access 95 perform up to its lofty capabilities. As you will see, you have the ability to really make Access 95 shine in the everyday world!

TOC Index Next Page Home