|
Marc,
Apparently, you are
seeking to force the AfterUpdate event of parent form from within the
AfterUpdate event of subform.
One of the
convenient ways to save the current record and force AfterUpdate
event of a form (which has been dirtied), is to set its Dirty
property to False.
However, in a form /
subform situation, whenever you enter a subform, AfterUpdate event of the
parent form has already fired and it is no longer dirty. Similarly, when you
leave the subform and enter the parent form, AfterUpdate event of the subform
has already fired and it is no longer dirty.
Therefore, a
straightforward statement like the following (in subform's module), is not
effective.
Me.Parent.Dirty = False
Solution therefore
lies in calling the AfterUpdate event of the parent form through a public
procedure embedded in the parent form itself. Sample procedure named
P_FormAfterUpDt(), to be included in parent form's module, is given below.
Having done this, sample code in subform's AfterUpdate event, as given below,
will force AfterUpdate event of the parent form as well.
Best wishes,
A.D.Tejpal
Parent Form's
Module
================================
Public Sub
P_FormAfterUpDt()
Form_AfterUpdate End Sub ================================
SubForm's
Module
================================
Private Sub
Form_AfterUpdate()
Me.Parent.P_FormAfterUpDt End Sub ================================
Please zip all files prior to uploading to Files section.
SPONSORED LINKS
YAHOO! GROUPS LINKS
|
- [AccessDevelopers] on update marcslists
- Re: [AccessDevelopers] on update A.D.Tejpal
