Chapter 5. Interacting with Data Using ADO and SQL
In this chapter, you turn your attention to one of the most important concepts in Access programming: working with data in databases. Data is, after all, at the heart of almost every application. Programmers typically write applications to enable users to interact with data in meaningful ways. You have probably created Access applications yourself that retrieve data using forms that are bound directly to tables.
This chapter expands your knowledge of working with data by covering the basics of retrieving and modifying data from VBA code using ActiveX Data Objects (ADO). You will create the same contact form in three different ways so that you can see the various approaches to interaction with the same underlying data source. I will also cover the basics of writing SQL statements to interact with the database. The chapter ends with a brief section on the ADOX object model that can be used to manage database objects such as tables, users, and groups.
Introduction to Data Access
ADO is an acronym for ActiveX Data Objects. DAO stands for Data Access Objects. Both ADO and DAO allow you to manipulate databases from your Access 2003 VBA code. Because all examples in prior editions of this book focused on DAO, I gave considerable thought as to whether I should provide examples on DAO in this edition. DAO has been around since the earliest versions of Access and has always been an excellent data access method for working with native Access ...
Get Beginning Access 2003 VBA now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.