Main/Subform Update Behavior

  • Thread starter Thread starter Keith
  • Start date Start date
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
 
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
 
Back
Top