Triggering event in combo box when selection not changed
Know the solution is in this forum, just haven't been able to use the proper key words to find it.
As I want and expect, my combo box's _change() event triggers both when the client makes her first selection and upon making a different selection from that list.
But there are actions that I need to duplicate when the client enters the combo box but does not change the selection. And I cannot seem to trigger a proper event for that situation.
My change event uses the combo box's Listindex to populate three textboxes from corresponding arrays. Upon clicking my CommandButtonNext, the text boxes initialize to null for the next iteration. In most cases, they are to remain blank. But in some cases, they require repopulation. And in most of those cases, using the same data related to the last Combo Box event. So far, the only indication for that need for repopulation is when the client re-enters the combo box but does not change the selection,
I've tried using the "_Click()" event. And considered the On_Exit() event. But I don't seem to get any event invoked when the selection remains unchanged.
I am considering a rather draconian solution of creating null values in my arrays that correspond to a null value in my combo box that I would trigger upon the CommandButtonNext_Click() event. That would force the client to select anew and trigger the _change() event. But doubt that is the best solution.
Ideally, when the client enters the combo box control, it will trigger an event even when the client makes no new selection that (1) does not interfere if she does make a selection (2) recognizes the Listindex of the last selection and (3) exits the sub() if no selection has yet been made.
Last edited by grNadpa; 03-03-2022 at 04:40 PM.
Reason: Adding tags
|