Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/101067

From BetaArchive Wiki

Article ID: 101067

Article Last Modified on 5/6/2003



APPLIES TO

  • Microsoft Access 1.0 Standard Edition
  • Microsoft Access 1.1 Standard Edition
  • Microsoft Access 2.0 Standard Edition



This article was previously published under Q101067

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

SYMPTOMS

When choosing a command button, you may receive the following error message:

Not enough stack memory left


This error message occurs when you activate a macro from the OnPush property in version 1.x, or the OnClick property in version 2.0, of a command button on a form. The macro includes a SendKeys action (in which the keystrokes sent include the ESC key) and the Wait argument is set to Yes.

CAUSE

The Cancel property of the command button is set to Yes.

RESOLUTION

Change the Cancel property of the command button to No.

MORE INFORMATION

You receive the above error message if you choose a command button and all the following conditions are met:

  • The macro attached to the command button includes a SendKeys action.
  • The command button's Cancel property is set to Yes.
  • You choose the command button by pressing ESC.

If the command button activates a macro that performs a SendKeys action, which in turn sends an ESC keystroke, the button that repeatedly activates the macro is chosen and an endless loop results. Note that if the Wait argument on the SendKeys action is set to No, Microsoft Access will appear to hang.

Steps to Reproduce Behavior


  1. Start Microsoft Access and open the sample database NWIND.MDB.
  2. Create a new macro called Test Macro:

          Test Macro Actions
          ------------------
          SendKeys
             Keystrokes: {esc}
             Wait: Yes
                            
  3. Open the Customers form in Design view.
  4. Add a command button to the form:

          Object: Command Button
          ----------------------
          ControlName: Test Button
            Caption: Test Button
            OnPush: Test Macro (version 1.x)
            OnClick: Test Macro (version 2.0)
            Cancel: Yes
                            
  5. Switch to Form view.
  6. Choose the Test button. The following error message appears:

    Not enough stack memory left


Keywords: kbprb kbusage KB101067