V
Vincent Verheul
Hi,
I have a main form that is unbound and has several subforms. I change the
SourceObject of the subform depending on the user's choice. This may result
in a situation where two subforms access the same table: using filters, the
same record may appear in both forms, but different fields are displayed on
each form.
The user can leave one form with the record in a 'Dirty' state an move focus
to the other form (same record), also attempting to make a change. Now of
course I get locking problems or the error "The data has been changed".
I have been looking for an event like Form_LostFocus, but is does not seem
to be triggered when I go from Form1 to a button on Form2. If I have that
event, I can check the 'Dirty' state and save the record before leaving the
form.
How can I detect that the user leaves (sub)Form1?
(Using XP and Access 2002).
Thanks!
Vincent
I have a main form that is unbound and has several subforms. I change the
SourceObject of the subform depending on the user's choice. This may result
in a situation where two subforms access the same table: using filters, the
same record may appear in both forms, but different fields are displayed on
each form.
The user can leave one form with the record in a 'Dirty' state an move focus
to the other form (same record), also attempting to make a change. Now of
course I get locking problems or the error "The data has been changed".
I have been looking for an event like Form_LostFocus, but is does not seem
to be triggered when I go from Form1 to a button on Form2. If I have that
event, I can check the 'Dirty' state and save the record before leaving the
form.
How can I detect that the user leaves (sub)Form1?
(Using XP and Access 2002).
Thanks!
Vincent