The information in this article applies to:
SUMMARYMicrosoft Access supports the execution of certain macro actions over a dynamic data exchange (DDE) channel. MORE INFORMATION
The only macro actions that you can execute over a DDE channel to
Microsoft Access are those supported by the DoCmd() function in Access
Basic. For this reason, the following macro actions cannot be executed:
The syntax for macro actions executed through DDE is the same as the syntax for macro actions called by the DoCmd() function, that is:
You cannot use the predefined constants that are available inside Access Basic, such as A_NORMAL, as arguments when you are executing macro actions with DDE. Instead, you must use the actual values of the constants. The values of the constants can be determined using the following procedure:
The following example creates a macro in Microsoft Excel that demonstrates how to execute macro actions in Microsoft Access using DDE: NOTE: This macro will not work in Microsoft Access version 1.0.
The command in cell A5 opens the sample database NWIND.MDB in the current working directory using the OpenDatabase pseudo action. (Pseudo actions are actions that are only valid over the DDE channel.) The commands in cells A6 and A8 execute the Microsoft Access macro action Beep. The command in cell A7 executes the Microsoft Access macro action OpenForm to open the Categories form in a minimized state. The command in cell A9 executes the Microsoft Access macro action OpenForm to open the Categories form in a normal state. The command in cell A10 closes the currently active object in Microsoft Access. The command in cell A11 closes the currently opened database file using the CloseDatabase pseudo action. The commands in cells A12 through A14 terminate the DDE channel, activate the Microsoft Excel application, and end the macro. REFERENCESMicrosoft Access "Language Reference," version 1.0, pages 149-150
Keywords : kbinterop |
Last Reviewed: March 22, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |