What event should I use

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form with several subforms. I have code that tests the validity of
the code on one of the subforms. I want to put this code where it will
execute and then not allow the user to move off the main form until the data
has been corrected The user could move to the next record using the
navigation buttons or they could close the form using the Exit button. I
tried the On Deactivate and the On Lost Focus on the subform but neither of
these executed the code.

Thanks for your help
 
Lynn
Thanks for the reponse. This worked in the BeforeUpdate event of the
subform but not the main form, which is OK.

I guess the second part of my question is how to return to the record if the
test in my code fails. If I try to do a requery I get a messag that the
macro in the BeforeUpdate property is preventing Access from saving the data
in the field.
Thanks
Marni
 
Back
Top