Microsoft KB Archive/95443

{|
 * width="100%"|

PRB: Focus Returns to Control After OnDblClick
'Article ID: Q95443

Creation Date: 09-FEB-1993

Revision Date: 19-SEP-1996' The information in this article applies to:


 * Microsoft Access versions 1.0 and 1.1

SYMPTOMS

If you assign an event (such as a function or macro) to the OnDblClick property of a control, the event is processed and the focus is returned to the control when you double-click the control. Even if the event contains a GoToControl action, the focus will still be returned to the control that you double-clicked.

RESOLUTION

To move the focus to another control, use the CancelEvent action after the GoToControl action in the macro or function.

The following sample macro demonstrates how to move the focus from Field1 to Field2 when you double-click Field1:

Macro Name  Action        Argument -  Test1        GoToControl   Field2 CancelEvent  (no arguments) The GoToControl action moves the focus to Field2, and the CancelEvent action cancels the double-click action, keeping the focus on Field2. STATUS

This behavior no longer occurs in Microsoft Access version 2.0.
 * }

-

"THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED &quot;AS IS&quot; 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." '' ©1997 Microsoft Corporation. All rights reserved. Legal Notices.

''

Additional reference words: 1.00 1.10

KBCategory: kbusage

KBSubcategory: FmsEvnt