Access VBA Macro Programming

(Joao Candeias) #1
the Object Browser for this information because it can be difficult to know what command to
use next. It is also easy to make mistakes that cause your code to produce errors when you
run it.

Using the Object Browser


The Object Browser is a useful tool for looking at the properties, methods, and constants of
an object—in this case, the Access and DAO (Data Access Objects)Applicationobject. To
access the Object Browser, select View | Object Browser from the VBE menu or pressF2.
Use the pull-down that says <All Libraries> to find the Object Library you require, and click
it. This will show all the classes of, for example, the Access object and the properties and
methods. It will also show the relationships and hierarchy of the objects themselves. Figure 14-3
shows how it looks onscreen.

184 Microsoft Access 2010 VBA Macro Programming


Figure 14-2 Displaying names of all Table Definitions within the Table Definitions collection
Free download pdf