can event procedures run concurrently

R

RayV

I have a form that opens with the detail hidden. After a selection is
made in a dropdown box in the form header an after update event runs
that:
unhides the detail
runs through the records to find the next null and sets the focus
to the record
When the dropdown box in the form header gets the focus the detail is
hidden again with an on got focus event for the dropdown box.

This all worked fine until we upgraded to 2007. Then what I believe
was happening was the after update event started running then the on
got focus (for the dropdown box) ran before the after update
finished. This caused the detail to be rehidden before the after
update event found the first null record to set the focus and it
bombed. I was able to 'fix' it by immediately setting the focus in
the after update to the detail of the form then find the first null.

Am I correct that the two events can run at the same time?
 
A

Arvin Meyer [MVP]

Am I correct that the two events can run at the same time?

Not that I know of. VB and VBA code runs sequentially. On some occasions, if
you shell out to an outside process, code in that process can run
simultaneously with code in your project.
 
P

Pat Hartman

Your process sounds a little convoluted. How about using criteria or a
filter that just selects the rows with the nulls all at once. Then you
don't have to futz with all the form manipulation.
 

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