The information in this article applies to:
Moderate: Requires basic macro, coding, and interoperability skills. This article applies to a Microsoft Access database (.mdb) and a Microsoft Access project (.adp). SYMPTOMSYou you try to use the GoToControl method or the SetFocus method in the AfterUpdate event of a control to set focus back the control that is being updated, the GoToControl or SetFocus method will be ignored. For example, the following code, will not cause the control named MyControl to retain focus once it is updated:
You will see the same behavior when you use the GoToControl action in a Macro.
CAUSEYou cannot set the focus on a form to an object that already has focus. RESOLUTIONYou can get the desired results in one of the following ways:
When you add this code to a control, the only way to move to a different control on the form is by using the pointer.
MORE INFORMATIONSteps to Reproduce Behavior
REFERENCESFor more information about the GoToControl action, click Microsoft Access Help on the
Help menu, type "GoToControl" in the Office Assistant or the Answer Wizard,
and then click Search to view the topics returned. Additional query words: prb
Keywords : kbusage kbdta McrActn |
Last Reviewed: May 13, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |