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



The information in this article applies to:

  • Microsoft Access Developer's Toolkit 7.0
  • Microsoft Office 97 Developer Edition

This article was previously published under Q148523
Moderate: requires basic macro, coding, and interoperability skills.

SYMPTOMS

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
    					

Modification Type:MajorLast Reviewed:10/28/2003
Keywords:kberrmsg kbprb KB148523