EXAMINING THE SYNTAX FOR API CALLS

Calling API routines from Access generally takes at least two steps, sometimes three, as follows:

1.
Declare the function in the Declarations section of a module.
2.
Create a wrapper routine to call the routine.
3.
Make the call to the API routine.

Note

A wrapper routine is a VBA routine that sets up the necessary environment for calling the routines, such as needed variables. In some cases, you can skip this step by simply calling the routine directly where it is needed.

The syntax for the last two steps is very much like those when calling VBA routines. The interesting step is the first one, the declaration of an API routine. (You might have noticed that the terms routines and calls have been used rather ...

Get F. Scott Barker's Microsoft® Access 2000 Power Programming 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.