ACC: AutoCorrect Triggers Change Event

Last reviewed: April 1, 1997
Article ID: Q165480
The information in this article applies to:
  • Microsoft Access versions 7.0, 97

SYMPTOMS

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

When you use the AutoCorrect feature in Microsoft Access to correct typing errors automatically, the Change event of a form control is triggered each time AutoCorrect is invoked. This can cause undesirable results, such as error messages or continuous looping of the automatic correction.

RESOLUTION

You can disable AutoCorrect for a text box or a combo box on a form by setting the control's AllowAutoCorrect property to No. You may want to do this for any text box or combo box on your form that has an event procedure or a macro attached to its Change event.

If you want to disable all or portions of the AutoCorrect feature, click AutoCorrect on the Tools menu, and change the options in the AutoCorrect dialog box.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Start Microsoft Access and open any database.

  2. Verify that the AutoCorrect feature is turned on by clicking AutoCorrect on the Tools menu. Verify that the "Replace text as you type" option is selected and that lowercase letter "i" is in the Replace list.

  3. Create a new form not based on any table or query:

          Form: TestAuto
          -----------------------------
          Text box:
    
             Name: Text0
             OnChange: [Event Procedure]
          Text box:
             Name: Text2
    
    

  4. Set the OnChange property of the Text0 text box to the following event procedure:

          Private Sub Text0_Change
    
             Me!Text2.SetFocus
          End Sub
    
    

  5. Switch the form to Form view.

  6. Type a lowercase letter "i" (without the quotation marks) in the Text0 text box. Note that you receive the error message:

          Run-time error '2110'
          Microsoft Access can't move the focus to the control Text2.
    

REFERENCES

For more information about the AutoCorrect feature, search the Help Index for "AutoCorrect," or ask the Microsoft Access 97 Office Assistant.


Keywords : FmsProp kbtool
Version : 7.0 97
Platform : WINDOWS
Hardware : x86
Issue type : kbprb


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: April 1, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.