Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

AfterUpdate event does not fire when combobox is cleared...

Status
Not open for further replies.

davidd31415

Programmer
Jan 25, 2006
154
US
I would like to fire an event after a combobox has been set to a new value. AfterUpdate works great unless the user presses delete to clear the value in the combobox and then moves to another field- the event does not fire in this case.

OnKeyDown works for me but the event is being called after each key press. Is there an event that will fire each time the value is changed but not after each key press?

I'm using an unbound form if that matters. For the time being I am adding a conditional to the OnKeyDown event to check for the delete key.

Thanks,

David
 
Haven't tried that one but I did just delete the OnKeyDown event handler that was in place. It ignored the delete key by setting the KeyCode to 0. Now if the user presses delete, when changing focus from the combobox AfterUpdate is called.

I'm not sure why AfterUpdate wasn't being called in the first place though; when tabbing out of the combobox after pressing delete the value in the box had been changed...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top