ADT/ODE: Run-time Application Error with Exit Button

Last reviewed: October 20, 1997
Article ID: Q148523
The information in this article applies to:
  • Microsoft Access Developer's Toolkit version 7.0
  • Microsoft Office 97 Developer Edition Tools

SYMPTOMS

Moderate: requires basic macro, coding, and interoperability skills.

When you add a switchboard item to close a run-time application installed with the Microsoft Office 97 Developer Edition Tools or the Microsoft Access Developer's Toolkit for Windows 95, a user may receive the following error message when the user clicks the button:

   Execution of this application has stopped due to a run-time error.
   The application cannot continue and will be shut down.

Although the desired result is to quit the program, the message box can be very distracting to the user.

RESOLUTION

There are two workarounds to prevent the user from receiving this error message.

Workaround 1

  1. Create the following new macro:

          Macro Name  Macro Action
          ------------------------
    
          QuitMacro   Quit
    
    

  2. Add the following command button to the switchboard form:

          Command button:
    
             Name: Button0
             Caption: Quit Application
             OnClick: QuitMacro
    
    

Workaround 2

  1. Add the following command button to the switchboard form:

          Command button:
    
             Name: Button0
             Caption: Quit Application
             OnClick: [Event Procedure]
    
    

  2. Set the command button's OnClick property to the following event procedure:

          DoCmd.Quit
    
Keywords          : FmsButb kberrmsg
Version           : 7.0 97
Platform          : WINDOWS
Hardware          : x86
Issue type        : kbprb
Solution Type     : kbworkaround


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 20, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.