Microsoft KB Archive/94110

{|
 * width="100%"|

ACC1x: Full Path Causes Endless Loop in StartApp Example

 * }

Q94110

-

The information in this article applies to:


 * Microsoft Access versions 1.0, 1.1

-

SUMMARY
Passing the full path of a DDE server to the StartApp function will cause an endless loop. The function will continue to run, starting up new copies of the specified DDE server, until the user stops the code or the workstation runs out of memory and the code fails.

The function works correctly if the name of the DDE server without the path is used.

MORE INFORMATION
The sample database NWIND.MDB contains a module called Introduction to Programming. Much of the Access Basic code used as examples in the &quot;Microsoft Access Basic: An Introduction to Programming&quot; manual, version 1.0 is included in this module. The sample function StartApp from page 142 contains a routine that can be used to initiate a DDE channel.

If the DDEInitiate in the StartApp function fails, the error handling routine StartApp: attempts to start the server. The error routine then passes control back to the main body of code, where the DDEInitiate is tried again.

If the full path to the DDE server is used when the StartApp function is called, the DDEInitiate function will fail, but the Shell function in the error routine will be successful.

The following is an example of using StartApp that will cause an endless loop:

  =StartApp(&quot;c:\winword\winword.exe&quot;,&quot;system&quot;)

The following is an example that will work correctly:

  =StartApp(&quot;winword&quot;,&quot;system&quot;) Additional query words: excel channel

Keywords : kbprg

Issue type : kbprb

Technology :