Share this Page URL
Help

Chapter 7. Exploring Objects > Setting a Reference in the Reference Library - Pg. 129

Exploring Objects 129 Setting a Reference in the Reference Library If your Visual Basic code has references to objects in other applications, you need to create or activate a reference to the object libraries of those applications. The reference libraries show all the libraries registered with the operating system. This also gives you an opportunity to see the DAO and ADO listings. If you plan to use DAO, you must set a reference to it because it is not set by default in Access 2002. The following exercise walks you through setting library references: 1. 2. While in the Access Database window, choose Insert, Module to open a Module window. While in the module, choose Tools, References to open the Reference dialog box, as shown in Figure 7.6. Figure 7.6. You can use the reference library to set the proper reference to your object model. 3. 4. 5. 6. The fourth option down should be the ADO reference library. On the vertical scrollbar, scroll down to Microsoft DAO 3.6 Object Library. To set a reference, simply click any box next to the desired reference. Click Cancel to close the References dialog box, and press F2 to view the objects for the se- lected reference, as shown in Figure 7.7.