Afterupdate with no update.

John Sh

Active member
Local time
, 03:59
Joined
Feb 8, 2021
Messages
662
This is probably a dumb question, but
I have a combo box that gets focus with the correct data.
When I click on the combo box there is no response from the "afterupdate" or "onclick" events.
How do I get focus to move to the next control?
 
Try the following line of code in the After Update event of the combo:

DoCmd.GoToControl "[NameOfYourControl]"
 
Last edited:
When I click on the combo box there is no response from the "afterupdate" or "onclick" events.
I think when you change something in the combo and press Enter key, the Default behavior is to stay on the combo.
unlike in the Textbox, when you press Enter key, you go to next Textbox/record.
 
Arnel, when I press Enter in a combobox, cursor moves to next control, even after changing value.

Combobox does not have an EnterKeyBehavior property which means this action cannot be altered like with textbox.

AfterUpdate and Click events work just fine for me.

If you want to provide db for analysis, follow instructions at bottom of my post.
 
Last edited:
Thank you all.
I finished up using the mouseup event.
Obviously the mouse down event works equally well but feels a bit too instantaneous.
John
 
That didn't work because the focus changes when you release the mouse button on the dropdown arrow.
You don't get to see the dropdown or select an item.
 
Perhaps clarify what you are trying to do and how - seems like your issue is when clicking on the combo down arrow?

And the after update on fires if the selection changes
 
That didn't work because the focus changes when you release the mouse button on the dropdown arrow.
You don't get to see the dropdown or select an item.

That's to be expected. If you want to trigger the AfterUpdate event procedure in a situation where the control's value is already the one you want, then you would either have to drop down the list and select the value again, or type the value again into the control without dropping down the list. However, why, in this situation can't you just tab out of the control to the next control in the tab order?
 

Users who are viewing this thread

Back
Top Bottom