PRB: OnChange Property Not Triggered with Combo Box SelectionArticle ID: Q115126Creation Date: 19-MAY-1994 Revision Date: 19-SEP-1996
The information in this article applies to:
SYMPTOMS
Novice: Requires knowledge of the user interface on single-user computers.
If you use a macro or an event procedure in a combo box's OnChange
property, that macro or event procedure does not run when you select an
item from the combo box's drop-down list.
RESOLUTION
Instead of using the macro or event procedure in the combo box's OnChange
property, use it in the BeforeUpdate or AfterUpdate property. The macro or
event procedure will then run when you select an item from the combo box's
drop-down list.
STATUS
This behavior no longer occurs in Microsoft Access for Windows 95
version 7.0.
MORE INFORMATION
A combo box's OnChange property is triggered only when the Text property
changes, either when you type directly in the combo box, or when you change
the Text property using a macro or Access Basic code. The OnChange property
is not triggered when you select an item from the drop-down list.
Steps to Reproduce Behavior
CAUTION: Following the steps in this example will modify the sample
database NWIND.MDB. You may want to back up the NWIND.MDB file, or perform
these steps on a copy of the NWIND database.
Test Change |
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.