What s in This Book

 < Day Day Up > 

What's in This Book

The book has 23 chapters divided into four parts, plus one appendix.

  • Part I, "Laying the Foundation," teaches you the syntax and programming structures that you need to understand before you can do useful work with VBA.

    Chapter 1, "Why Access? Why VBA?," is designed to get you oriented. Access isn't the only application in Office, and VBA isn't the only way to program Access. By the time you finish this first chapter, you should understand why we think using VBA to automate Access is a useful skill to have.

    Chapter 2, "Getting Around in the Visual Basic Editor," shows you the user interface that you use to write VBA code. We also show you some good coding practices in this chapter.

    Chapter 3, "Using Variables, Constants, and Data Types" introduces the first set of basic concepts that you need to understand to write VBA code.

    Chapter 4, "Using Procedures," gives you the tools to organize your VBA code. Procedures are independent units of code that can be executed one at a time to do useful work. You'll find many more procedures over the course of the book.

    Chapter 5, "Choosing the Right VBA Function," tours some of the support that VBA gives your code. Financial and date calculations, text manipulation, and mathematical functions are a few of the things that are built into VBA. Using these functions helps you get more done while writing less code of your own.

    Chapter 6, "Using Flow-of-Control Statements," demonstrates the tools that VBA provides for making decisions. For example, you can write a procedure that does one thing when a number is positive and another when the number is negative.

    Chapter 7, "Working with Arrays," discusses a way to store many pieces of information in a single variable. Arrays are useful when you're tracking a group of similar items.

    Chapter 8, "Understanding Objects," covers some of the most powerful concepts in VBA programming. Objects enable you to create structures in your VBA code that represent things. VBA and Access include a number of built-in objects that you can use in your code to represent things like forms open on the screen.

    Chapter 9, "Understanding Scope and Lifetime," introduces some remaining fine points of variable handling in Access.

  • Part II, "Working with the Access User Interface," builds on the foundation of Part I to show you how to work with the Access user interface from code. Just about anything you can do manually, from opening a form to running a query, you can also do with code. This is where VBA meets Access to provide a true automation tool, replacing and extending anything that you can do with Access macros.

    Chapter 10, "Working with Forms," shows you how to use VBA to automate Access forms. You learn how to open and close forms, open multiple copies of the same form, and pass information to a form, among other things.

    Chapter 11, "Analyzing the Access Event Model," drills into event handling in Access. Events enable you to run code when something happens onscreen. For example, you can have a bit of VBA code attached to a form so that the code runs every time a database user opens the form.

    Chapter 12, "Working with List and Combo Boxes," shows you how to use VBA to populate and manipulate these two important controls.

    Chapter 13, "Working with Other Controls," shows you how to use VBA with a variety of other controls on Access forms. These controls include text boxes, option buttons, and subforms.

    Chapter 14, "Working with Reports," demonstrates the use of VBA code with Access reports. You have almost complete control over the data and layout of reports from code, if you know what you're doing.

    Chapter 15, "Working with the Application Collections," tells you how to use VBA to get information about Access objects such as forms, reports, tables, and queries.

  • Part III, "Working with Access Data," turns from the Access user interface to the data stored in Access. Here, you learn about using the ActiveX Data Objects (ADO) library to read and change data.

    Chapter 16, "Retrieving Data with ADO," begins the process by demonstrating how to get data from tables and queries and put it into recordset objects in memory. You learn how to get just the data that your VBA code needs to work with.

    Chapter 17, "Manipulating Data with ADO," looks at the other half of the process: adding, deleting, and updating data. ADO enables you to perform all these operations easily.

    Chapter 18, "Creating Objects with ADOX," deals with a specialized area of ADO that enables you to create your own data-bearing objects. For example, you can use ADOX to create an entirely new Access table without ever touching the Access user interface.

    Chapter 19, "Performing Advanced Data Operations," digs into a few more corners of ADO. This chapter is primarily about working with a database that's used simultaneously by more than one user.

  • Part IV, "Using Advanced VBA Techniques in Access," touches on some advanced VBA techniques. You might never need any of these techniques, but they show you some of the powerful operations that VBA is capable of.

    Chapter 20, "Working with Data Files," demonstrates techniques for working with data stored in regular text files. Even though Access stores its own data within databases, VBA makes it possible to work with all sorts of other files.

    Chapter 21, "Automating Other Applications," shows you how you can use VBA code in Access to manipulate applications such as Microsoft Word or Microsoft Excel. You learn how easy it is to use this technique to make use of functionality from other applications.

    Chapter 22, "Working with XML Files," teaches you how VBA and Access support Extensible Markup Language (XML). XML is a current darling of the software industry, so it's likely that you'll run across XML files sooner or later.

    Chapter 23, "Using the Windows API," rounds out the book. Here, you see how to use powerful functions supplied by Microsoft Windows itself to do things that are otherwise impossible.

  • Finally, Appendix A, "Review of Access SQL," includes a review of the SQL language used to retrieve and manipulate data in Access. Although SQL itself isn't a part of VBA, you need to know SQL to use some of the other functions you see in this book.

     < Day Day Up > 

    Automating Microsoft Access with VBA
    Automating Microsoft Access with VBA
    ISBN: 0789732440
    EAN: 2147483647
    Year: 2003
    Pages: 186

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net