On Changed not called

  • Thread starter Thread starter David
  • Start date Start date
D

David

If I change a combo box by typing in letters and having it auto match then
tabbing out of the field, the on change isn't called. If I use the mouse to
get to the drop down list and select it then it is.
??
 
If I change a combo box by typing in letters and having it auto match then
tabbing out of the field, the on change isn't called. If I use the mouse to
get to the drop down list and select it then it is.

You need to use the "AfterUpdate" event procedure. The "On Change" event is
triggered each time you type a character into the control. The reason your code
is not working is likely because the "value" of the control hasn't been set
until the control has been updated. You only change the "Text" property of the
control as you type, not the "Value" property.
 
That was it .. I hesitated on using AfterUpdate since it sounded like it
would be called after the record was updated (but it doesn't seem to).
 
Don't get confused between Control_AfterUpdate and Form_AfterUpdate.

The Form_AfterUpdate Event happens when the Record is updated into the
Table.

The Control_AfterUpdate Event happens when the Value of this Control is
updated in the Record Buffer. This is where the OldValue is different from
the Value.
 
Back
Top