BUG: DBCombo Control Change Event Does Not FireLast reviewed: June 2, 1997Article ID: Q166929 |
The information in this article applies to:
SYMPTOMSProgram code in the Change event procedure of Microsoft Visual Basic version 5.0 will not execute. Applications written using Visual Basic version 4.0 may no longer work as expected if functionality is based on responding to a Change event in a DBCombo control.
RESOLUTIONThe resolution to this behavior is to replace the functional code of the Change event procedure with equivalent code entered in the Click event procedure. This code is conditioned by testing the DataChanged property of the DBCombo control. An example of this workaround is as follows:
Private Sub DBCombo1_Click(Area As Integer) If DBCombo1.DataChanged Then ' Any code that would normally be in the Change Event ' or call the Change event like this: DBCombo1_Change ' followed by code that resets the DataChanged property, such as: DBCombo1.DataChanged = False End IF End SubIf the user normally tabs to the DBCombo control and then uses arrow keys to navigate to an item in the list, similar code would be required in the KeyPress, KeyDown and/or KeyUp event procedures. In this case, it would be more effective to write a single form-level module to replace the code of the DBCombo Change event and call it from the various places where the DBCombo.DataChanged property would be tested.
STATUSMicrosoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Steps to Reproduce Behavior
|
Keywords : vb5all VBKBCtrl VBKBDB
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |