Can Access VBA tell the difference between typing

2019-07-20 06:45发布

问题:

I've got a combo box, "Filter Dropdown", that triggers some VBA code on Filter_Dropdown_Change().

The problem I'm having is I want it to trigger once the final value has been selected. So, currently, it triggers when I select a value from the dropdown, which is fine, but also when I type anything, because each character counts as a change - which I don't want.

Is there a way of telling when I've finished typing a new value into the combo box? Can Access differentiate at all between selecting a pre-existing value and typing a new one?

I suspect I'm using the wrong event?

回答1:

Use AfterUpdate or BeforeUpdate event