Chapter 13: Accessing Data with VBA Code
509
Updating fields in a record using ADO
Use the AfterUpdate event procedure to update LastSalesDate (see Figure 13.15). This
procedure uses ADO syntax to operate directly on tblCustomers.
FIGURE 13.15
Using ADO to update a table
The programming syntax used to access and manipulate the data in an Access database is ADO.
ADO defines a number of different objects, each with a set of properties and methods for perform-
ing a variety of data-oriented operations.
ADO is not a programming language. Instead, it’s a VBA syntax specifically designed for data
access. Syntax simply refers to the words and phrases you use in your VBA code to accomplish a
particular task.
ADO is a versatile means of accessing data from various locations. The Collectible Mini Cars exam-
ples you’ve seen so far show you how to use Access to update data in a local Access database. All
tables, queries, forms, and reports are stored in a single Access database file located either in a
folder on your desktop or on a file server. But Access, as a generic database development tool, can
interact with all kinds of databases. You can develop forms and reports in one Access database that
get their data from another Access database that may be on your local desktop or on a remote file
server. You can even link to non-Access server databases, like Oracle and SQL Server, just as easily
as you can link to an Access database.