Chapter 10. Programming Access Databases

     

In this chapter

  • Learning about database programming.

  • Getting your projects and system set up to program databases.

  • Opening data in a recordset.

  • Accessing recordset data.

  • Navigating, finding, editing, adding, and deleting records.

  • Retrieving data into an Excel worksheet.

In the past few chapters, you've learned about the objects, properties, and methods associated with Word, Excel, and PowerPoint. You've seen that it's possible to manipulate these objects to automate routine tasks and gain an unprecedented amount of control over these programs.

In this chapter, you'll see that using VBA with Access is quite a bit different because you won't learn anything about Access objects. Yes, Access does have an Application object, and there's a whole hierarchy of objects for things like forms and reports . However, it's a rare that a VBA programmer ever has to manipulate Access using these objects. Instead, what Access programmers really want to get their hands on is the data contained in Access tables and queries.

The secret to doing this is that database info is accessed using an entirely different object hierarchy altogether. It's called ActiveX Data Objects (ADO) and it's the link between your Access VBA programs and the databases, tables, and queries you want to work with. The amazing thing about all of this is that you can use ADO to work with Access databases from other Office applications. For example, you could use ADO programming to grab data from an Access table and insert it into an Excel range. This chapter takes you through the basics of using ADO to access and work with Access databases.



Absolute Beginner's Guide to VBA
Absolute Beginners Guide to VBA
ISBN: 0789730766
EAN: 2147483647
Year: 2003
Pages: 146

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