BeforeUpdate event in TabControl

  • Thread starter Thread starter IPIPKIN
  • Start date Start date
I

IPIPKIN

Hi
If I change data on one page of tab control and move to another page
Form_BeforeUpdate event occurs and actually change does to database.
Why is it happened?
Thanks
 
The first thought that occurs is if the tab you are navigating to conatins a
subform you force the update event on your main form.
 
IPIPKIN said:
If I change data on one page of tab control and move to another page
Form_BeforeUpdate event occurs and actually change does to database.


The fact that you have a Tab control and are moving the
focus from one page to another is irrelevent.

Anytime the focus moves from a main form to a subform or
vice-versa, any edits to the current record in the form
that's losing the focus are saved. This is required to make
sure that the data seen by the main form and its subforms is
in a consistent state.

If you are not using subforms, then there is only the main
form and data changes will not happen just because you move
from one control to another (unless you have some code that
explicitly forces a save).

If you think you're seeing something different than that,
then please provide more details so we can try to understand
what is going on.
 
Back
Top