ACC1x: Full Path Causes Endless Loop in StartApp() Example

ID: 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 "Microsoft Access Basic: An Introduction to Programming" 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("c:\winword\winword.exe","system") 


The following is an example that will work correctly:


   =StartApp("winword","system") 

Additional query words: excel channel

Keywords : kbprg
Version : 1.0 1.1
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: March 12, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.