Can Access VBA tell the difference between typing into a combo box and selecting from a drop down?

纵然是瞬间 提交于 2019-12-11 02:59:48

问题


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



来源:https://stackoverflow.com/questions/26545974/can-access-vba-tell-the-difference-between-typing-into-a-combo-box-and-selecting

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!