P
pgcn
I want a textbox (DateChanged) on the subform (sfmStakeholder_Details)
to reflect the date the record was last changed. This subform has a
number of tabs and often I need to view the tabs and/or copy text (Ctrl
+C) without editing or changing DateChanged. There may also be a
number of records (Stakeholder_Details) for each frmStakeholder and I
don't want the date changing when they are passed using the navigation
record selector or when the details are copied into a new record (thus
ruling out Dirty or BeforeUpdate??). I tried using
sfmStakeholder_Details_AfterUpdate but the form loads with the current
date on the active record.
DateChanged is bound to a field with default value of Now( ).
What I have at the moment (where the datechanged does not change at
all) is:
Private Sub DateChanged_BeforeUpdate(Cancel As Integer)
If Format(Me.DateChanged, "dd/mm/yyyy") <> Format(Now(), "dd/Mm/
yyyy") Then
Call Changed
End If
End Sub
Private Sub Changed() 'in the General Declarations of
sfmStakeholder_Details
Me.fUserID = [Forms]![frmLogIn]![fUserID]
Me.DateChanged = Now()
End Sub
Hope I have explained this well enough.
Many thanks for your time and expertise.
Peta
to reflect the date the record was last changed. This subform has a
number of tabs and often I need to view the tabs and/or copy text (Ctrl
+C) without editing or changing DateChanged. There may also be a
number of records (Stakeholder_Details) for each frmStakeholder and I
don't want the date changing when they are passed using the navigation
record selector or when the details are copied into a new record (thus
ruling out Dirty or BeforeUpdate??). I tried using
sfmStakeholder_Details_AfterUpdate but the form loads with the current
date on the active record.
DateChanged is bound to a field with default value of Now( ).
What I have at the moment (where the datechanged does not change at
all) is:
Private Sub DateChanged_BeforeUpdate(Cancel As Integer)
If Format(Me.DateChanged, "dd/mm/yyyy") <> Format(Now(), "dd/Mm/
yyyy") Then
Call Changed
End If
End Sub
Private Sub Changed() 'in the General Declarations of
sfmStakeholder_Details
Me.fUserID = [Forms]![frmLogIn]![fUserID]
Me.DateChanged = Now()
End Sub
Hope I have explained this well enough.
Many thanks for your time and expertise.
Peta