O'Reilly logo

Access 2003 VBA Programmer's Reference by Armen Stein, Graham Seach, Teresa Hennig, Patricia Cardoza

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

B.2. Adding References to Your Projects

As noted above, adding references to libraries from your Access project can allow you to quickly enhance the functionality of your application with less coding effort. The types of type or object libraries that Access can reference include:

  • Type libraries: OLB, TLB, and DLL

  • ActiveX Controls: OCX

You have seen that you can automate Office applications by adding a reference to one of the libraries that comes with Microsoft Office, for example, Microsoft Office 11.0 Object Library. Here are the steps necessary to add a reference, as well as what it means when you do.

Open the Visual Basic Editor and select Tools | References. This will display the References dialog box as shown in Figure B-1.

The items listed in the Available References list include items that have been registered to the Windows System Registry. To add one of these libraries to references for your project, check the box to the left of the library. When you close and reopen the References dialog box, any libraries you have checked will move above all unselected libraries.

Figure B.1. Figure B-1

NOTE

The order of the libraries you have selected is important. See section Order of References Is Important later in this appendix.

Many application installation packages will handle registering libraries for you. If the application you install does register the library you want, there ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required