Chapter 19: Understanding Visual Basic Fundamentals


Overview

In this chapter, you’ll learn how to create, edit, and test Microsoft Visual Basic code in your Microsoft Office Access 2007 applications. The chapter covers the following major topics:

  • The Visual Basic Editor (VBE) and its debugging tools

  • Variables and constants and how to declare them

  • The primary object models defined in access-the Access model, the Data Access Objects (DAO) model, and the ActiveX Data Objects (ADO) model.

    You’ll need to understand these models to be able to manipulate objects such as forms, form controls, and recordsets in your code.

  • Visual Basic procedural statements

    • Function and Sub statements

    • Property Get, Property Let, and Property Set (for use in class modules) statements

    • Flow-control statements, including Call, Do, For, If, and Select Case

    • DoCmd and RunCommand statements

    • On Error statements

  • A walk-through of some example code you’ll find in the sample databases

If you’re new to Visual Basic, you might want to read through the chapter from beginning to end, but keep in mind that the large section in the middle of the chapter on procedural statements is designed to be used primarily as a reference. If you’re already familiar with Visual Basic, you might want to review the sections on the Visual Basic Editor and the object models, and then use the rest of the chapter as reference material.

Note 

image from book You can find many of the code examples from this chapter in the modExamples module in the Contacts.accdb and Housing.accdb sample databases on the companion CD.




Microsoft Office Access 2007 Inside Out
MicrosoftВ® Office Access(TM) 2007 Inside Out (Microsoft Office Access Inside Out)
ISBN: 0735623252
EAN: 2147483647
Year: 2007
Pages: 234

Similar book on Amazon
Access 2007: The Missing Manual
Access 2007: The Missing Manual
Microsoftu00ae Office Access(TM) 2007 Step by Step (Step By Step (Microsoft))
Microsoftu00ae Office Access(TM) 2007 Step by Step (Step By Step (Microsoft))
Microsoft Office Access 2007 Forms, Reports, and Queries
Microsoft Office Access 2007 Forms, Reports, and Queries
Alison Balter's Mastering Microsoft Office Access 2007 Development
Alison Balter's Mastering Microsoft Office Access 2007 Development

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