ADT: Use "MSACCESS" in DDEInitiate w/ Run-Time App (1.0, 2.0)
ID: Q101372
|
The information in this article applies to:
-
Microsoft Access Distribution Kit, version 1.1
-
Microsoft Access Developer's Toolkit, version 2.0
SYMPTOMS
Advanced: Requires expert coding, interoperability, and multiuser skills.
Applications can initiate a dynamic data exchange (DDE) conversation
with a run-time application developed with Microsoft Access by specifying
"MSACCESS" rather than the .MDB file, as the application name.
STATUS
This behavior is by design.
MORE INFORMATION
To communicate with a run-time application using DDE, it is strongly
recommended that you use the name of the .MDB file, not "MSACCESS,"
as the application name when you are initiating a DDE conversation.
The run-time version of Microsoft Access responds to both Microsoft Access
and the name of the .MDB file as the application name.
Steps to Reproduce Behavior
- Start Microsoft Access and open the sample database NWIND.MDB.
- In the Database window, choose the Macro button and select Sample
AutoExec from the list.
- From the File menu, choose Rename. In the Macro Name box, type
"AutoExec" (without the quotation marks), and then press ENTER.
- Quit Microsoft Access.
- In Program Manager, choose Run from the File menu.
- Type the following line, and then press ENTER:
C:\<ACCESS>\MSARN100.EXE NWIND.MDB
where <ACCESS> is your Microsoft Access program directory.
- Start Microsoft Access again and create a new database, or open a
database other than NWIND.MDB.
- Create or open a module and add the following Access Basic
function:
Option Explicit
Function DDEWithNWIND ()
Dim chan
chan = DDEInitiate("MSACCESS", "NWIND;TABLE Employees")
MsgBox DDERequest(chan, "FirstRow")
DDETerminate chan
End Function
- From the View menu, choose Immediate Window. Type the following line,
and then press ENTER:
? DDEWithNWIND()
Note that a message containing the first record from the Employees table
in NWIND.MDB is displayed.
NOTE: The run-time application responds correctly to the DDEInitiate()
statement that reads:
chan = DDEInitiate("NWIND", "NWIND;TABLE Employees")
Additional query words:
Keywords : kbusage
Version : WINDOWS:1.1,2.0
Platform : WINDOWS
Issue type : kbprb