bypassing AfterUpdate

G

Guest

I have several combo boxes in which I have code to "roll" between the items
usinp the "+" or "-" keys. I also have code in the AfterUpdate event that
sets the focus based on the value of the control. If the value is selected
from the keyboard, all is fine. However, if the value is selected by
"rolling" to another item, the focus is not set and goes to the next
available control. In another combo box where the previous record's value is
inserted, the code in the afterUpdate event is not executed unless you enter
a keystroke or select with the mouse. Is there a way to correct this?
Thanks,
 
B

Brendan Reynolds

This is by design. The BeforeUpdate and AfterUpdate events are not fired
when data is changed programmatically. The best solution is to put the
common code that you want to run regardless of how the data is updated into
a shared procedure, and call that procedure both from the AfterUpdate event
procedure and from the code that programmatically updates the data.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top