13.3. Linking Libraries in Access 2003

There are two ways to link a library to an Access 2003 database; either reference the library, or declare it.

13.3.1. Referencing a Library

When you set a reference to an external library in Access 2003, you can use its functions as though they were built-in to Access. You can reference type libraries, object libraries, and control libraries.

For example, because the Microsoft Excel Object Library is itself a library of functions, you can reference (link to) it in Access and use its functions as though they were part of Access. To reference a library, launch the References dialog box, as shown in Figure 13-3, by selecting References from the Tools menu in the Visual Basic Editor.

Figure 13.3. Figure 13-3

Browse the list to see a large range of libraries. Some typical libraries include:

  • Microsoft Office 11 Object Library

  • Microsoft Excel, Word, and the other members of the Office suite

  • Microsoft ActiveX Data Objects 2.7 Library

  • Microsoft DAO 3.6 Object Library

  • Microsoft Scripting Runtime

  • Microsoft SQLDMO Object Library

Of course, many of the libraries you'll find listed in the References dialog box are from suppliers other than Microsoft, and depend on the applications you have installed on your computer. You might find such things as

  • Corel—CorelDraw 11.0 Library

  • Symantec.Norton.AntiVirus.OfficeAntiVirus 1.0 Type Library

To reference a library, ...

Get Access 2003 VBA Programmer's Reference 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.