Main/Subform Update Behavior

K

Keith

I have a form that contains a subform. I would like the AfterUpdate event of
the main form to run a routine. The problem I am facing is that, apparently,
the AfterUpdate event on the main form fires when the focus is changed to the
subform. It would appear that the record in the main form is saved when the
focus is changed. Anyway, my intention is for a user to enter data in the
main form, then enter some data in the subform, and then update the main
record. The AfterUpdate firing on the main form when the focus changes is
causing the code to run earlier in the process than I desire. I know this is
a convoluted description of my problem, but does anyone know a technique to
handle this?

Thanks
 
K

Keith

Hi Bonnie,

Thanks for the response. I'm not sure I want to add the routine to the
subform AfterUpdate since the user may, at times, change data on the main
form after the subform data has already been entered. What I think I'm going
to do is add a field to the main form record source that indicates whether or
not the record is "approved" and ready to run the remainder of the
AfterUpdate code. It's a little less automatic than I'd like it to be, but
the client told me this would be an acceptable workaround.

Thanks again,

Keith
 

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