Access Vba Programming

Only available on StudyMode
  • Topic: Microsoft Access, XML, Visual Basic for Applications
  • Pages : 313 (93661 words )
  • Download(s) : 21
  • Published : March 10, 2013
Open Document
Text Preview
Access™ 2007 Programming by Example with VBA, XML, and ASP

Julitta Korol

Wordware Publishing, Inc.

Library of Congress Cataloging-in-Publication Data Korol, Julitta. Access 2007 programming by example with VBA, XML, and ASP / by Julitta Korol. p. cm. Includes index. ISBN-13: 978-1-59822-042-1 ISBN-10: 1-59822-042-X (pbk.) 1. Microsoft Access. 2. Database management. 3. Microsoft Visual Basic for applications 4. XML (Document markup language) 5. Active server pages I. Title. QA76.9.D3K65733 2007 005.75'65--dc22 2007044561 CIP

© 2008, Wordware Publishing, Inc. All Rights Reserved 1100 Summit Avenue, Suite 102 Plano, Texas 75074

No part of this book may be reproduced in any form or by any means without permission in writing from Wordware Publishing, Inc.

Printed in the United States of America

ISBN-13: 978-1-59822-042-1 ISBN-10: 1-59822-042-X 10 9 8 7 6 5 4 3 2 1 0711

Microsoft is a registered trademark and Access is a trademark of Microsoft Corporation in the United States and/or other countries. Other brand names and product names mentioned in this book are trademarks or service marks of their respective companies. Any omission or misuse (of any kind) of service marks or trademarks should not be regarded as intent to infringe on the property of others. The publisher recognizes and respects all marks used by companies, manufacturers, and developers as a means to distinguish their products. This book is sold as is, without warranty of any kind, either express or implied, respecting the contents of this book and any disks or programs that may accompany it, including but not limited to implied warranties for the book’s quality, performance, merchantability, or fitness for any particular purpose. Neither Wordware Publishing, Inc. nor its dealers or distributors shall be liable to the purchaser or any other person or entity with respect to any liability, loss, or damage caused or alleged to have been caused directly or indirectly by this book.

All inquiries for volume purchases of this book should be addressed to Wordware Publishing, Inc., at the above address. Telephone inquiries may be made by calling: (972) 423-0090

Contents
Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii

Part I — Introduction to Access 2007 VBA Programming
Chapter 1 Writing Procedures in Modules . . . . . . . . . . . . . . . . . . . . . 3 Procedure Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Module Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Standard Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Writing Procedures in a Standard Module . . . . . . . . . . . . . . . . . . . . 6 Executing Your Procedures and Functions . . . . . . . . . . . . . . . . . . . . 9 Class Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Events, Event Properties, and Event Procedures . . . . . . . . . . . . . . . . . . . . . 13 Why Use Events? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Walking Through an Event Procedure . . . . . . . . . . . . . . . . . . . . . . . . 14 Compiling Your Procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Placing a Database in a Trusted Location . . . . . . . . . . . . . . . . . . . . . . 19 Chapter Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Chapter 2 The Visual Basic Editor (VBE) . . . . . . Understanding the Project Explorer Window . . . . Understanding the Properties Window . . . . . . . Understanding the Code Window . . . . . . . . . . Other Windows in the VBE . . . . . . . . . . . . . On-the-Fly Syntax and Programming Assistance . . List Properties/Methods . . . . . . . . . . . . Parameter Info . . . . . . . . . . . . . . . . . List Constants...
tracking img