Microsoft KB Archive/101318: Difference between revisions
(importing KB archive) |
m (Text replacement - """ to """) |
||
Line 49: | Line 49: | ||
Run-time applications developed with Microsoft Access have the same dynamic data exchange (DDE) server capabilities as applications in the retail version of Microsoft Access.<br /> | Run-time applications developed with Microsoft Access have the same dynamic data exchange (DDE) server capabilities as applications in the retail version of Microsoft Access.<br /> | ||
<br /> | <br /> | ||
However, in order to communicate with a run-time application using DDE, you must use the name of the .MDB file, instead of | However, in order to communicate with a run-time application using DDE, you must use the name of the .MDB file, instead of "MSACCESS" when initiating a DDE conversation. | ||
</div> | </div> | ||
Line 62: | Line 62: | ||
<li>Start Microsoft Access and open the sample database NWIND.MDB.</li> | <li>Start Microsoft Access and open the sample database NWIND.MDB.</li> | ||
<li>Choose the Macro button and select the Sample Autoexec macro.</li> | <li>Choose the Macro button and select the Sample Autoexec macro.</li> | ||
<li>From the File menu, choose Rename. In the Macro Name box, type | <li>From the File menu, choose Rename. In the Macro Name box, type "Autoexec" (without the quotation marks), and then press ENTER.</li> | ||
<li>Quit Microsoft Access.</li> | <li>Quit Microsoft Access.</li> | ||
<li>From the File menu in Program Manager, choose Run.</li> | <li>From the File menu in Program Manager, choose Run.</li> | ||
<li>Type | <li>Type "c:\access\msarn110.exe nwind.mdb" (without the quotation marks), and then press ENTER.</li> | ||
<li>Start Microsoft Access, and create or open a database other than NWIND.MDB.</li> | <li>Start Microsoft Access, and create or open a database other than NWIND.MDB.</li> | ||
<li><p>Create or open a module and add the following Access Basic function:</p> | <li><p>Create or open a module and add the following Access Basic function:</p> | ||
Line 72: | Line 72: | ||
Function DDEWithNWIND () | Function DDEWithNWIND () | ||
Dim chan | Dim chan | ||
chan = DDEInitiate( | chan = DDEInitiate("NWIND", "NWIND;TABLE Employees") | ||
MsgBox DDERequest(chan, | MsgBox DDERequest(chan, "FirstRow") | ||
DDETerminate chan | DDETerminate chan | ||
End Function | End Function | ||
</pre> | </pre> | ||
<p>Note that the first argument specified in the DDEInitiate command, the application name, is | <p>Note that the first argument specified in the DDEInitiate command, the application name, is "NWIND", which is the name of the .MDB file, and not "MSACCESS."</p></li> | ||
<li><p>From the View menu, choose Immediate Window. Type the following line, and then press ENTER:</p> | <li><p>From the View menu, choose Immediate Window. Type the following line, and then press ENTER:</p> | ||
<pre class="codesample">? DDEWithNWIND() | <pre class="codesample">? DDEWithNWIND() |
Latest revision as of 09:20, 20 July 2020
Article ID: 101318
Article Last Modified on 6/13/2001
APPLIES TO
- Microsoft Access Distribution Kit 1.1
- Microsoft Access Developer's Toolkit 2.0
This article was previously published under Q101318
SUMMARY
Advanced: Requires expert coding, interoperability, and multiuser skills.
Run-time applications developed with Microsoft Access have the same dynamic data exchange (DDE) server capabilities as applications in the retail version of Microsoft Access.
However, in order to communicate with a run-time application using DDE, you must use the name of the .MDB file, instead of "MSACCESS" when initiating a DDE conversation.
MORE INFORMATION
The following example demonstrates how to communicate with a run-time application developed with Microsoft Access:
- Start Microsoft Access and open the sample database NWIND.MDB.
- Choose the Macro button and select the Sample Autoexec macro.
- From the File menu, choose Rename. In the Macro Name box, type "Autoexec" (without the quotation marks), and then press ENTER.
- Quit Microsoft Access.
- From the File menu in Program Manager, choose Run.
- Type "c:\access\msarn110.exe nwind.mdb" (without the quotation marks), and then press ENTER.
- Start Microsoft Access, and create 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("NWIND", "NWIND;TABLE Employees") MsgBox DDERequest(chan, "FirstRow") DDETerminate chan End Function
Note that the first argument specified in the DDEInitiate command, the application name, is "NWIND", which is the name of the .MDB file, and not "MSACCESS."
From the View menu, choose Immediate Window. Type the following line, and then press ENTER:
? DDEWithNWIND()
Note that a message box displays the first record from the Employees table in the NWIND.MDB database.
Additional query words: adk adt nxml
Keywords: kbhowto kbinterop KB101318