O'Reilly logo

Access™ 2007 VBA Programmer's Reference by Armen Stein, Geoffrey Griffith, Rob Cooper, Teresa Hennig

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

14.1. Introducing the Win32 API

An API—application programming interface—is simply a group of standard functions that are packaged together and made available to application programmers. There are quite a few APIs, but the one that you've probably heard the most about is the Win32 API, also known as the 32-bit Windows API. The Windows API consists of many DLLs that make up the Windows operating system and ensure that every application that runs under Windows behaves in a consistent manner.

What this actually means is that standard Windows operations such as saving files, opening forms, managing dialog boxes, and so on are all handled by the Windows APIs. For example, the standard Windows File Open dialog box is an API function called GetOpenFileName found in comdlg32.dll. Similarly, the GetTempPath function in Kernel32.dll returns the name of the folder where temporary files are stored.

The File dialog boxes found in Office applications are customized versions of the Windows dialog boxes. To use these dialog boxes, use the FileDialog object in the Office 12.0 Object Library.

All Windows-based applications interact with the Windows APIs in some way, whether they are opening a file, displaying time, putting text on the screen, or managing computer memory while you play Flight Simulator.

When you program in Microsoft Access, you use the built-in VBA functions, which you could loosely refer to as an API. Similarly, when you use the Access Add-in Manager or References dialog box ...

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