T
Ted
i have a form which has a bit of vba that's used the "On Current" event, the
part that concerns this post is just below:
Me.Time_on_List = DateDiff("d", Me.Date_on_List, Now())
and the same form has the following code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.Dirty Then
Me.Updated_by = LAS_GetUserName()
Me.Last_edited = Now()
End If
End Sub
which edits the two fields "Udated_By" and "Last_edited" each record just
prior to its being updated.
before adding the "Time_on_List" field which is computed every time the user
observes a record (as the user scrolls through the form), the code above was
modified only if a user deliberately edited some control on the form. at this
point, even scrolling through the records has the same effect on the
"Updated_by", but particularly the "Last_edited" fields since this last one
is computed from "Now()" and gets changed every time the user observes a
record!
is there some way to get the code to ignore the fact the "Time_on_List"
field when assessing whether a record's dirty or not?
part that concerns this post is just below:
Me.Time_on_List = DateDiff("d", Me.Date_on_List, Now())
and the same form has the following code:
Private Sub Form_BeforeUpdate(Cancel As Integer)
If Me.Dirty Then
Me.Updated_by = LAS_GetUserName()
Me.Last_edited = Now()
End If
End Sub
which edits the two fields "Udated_By" and "Last_edited" each record just
prior to its being updated.
before adding the "Time_on_List" field which is computed every time the user
observes a record (as the user scrolls through the form), the code above was
modified only if a user deliberately edited some control on the form. at this
point, even scrolling through the records has the same effect on the
"Updated_by", but particularly the "Last_edited" fields since this last one
is computed from "Now()" and gets changed every time the user observes a
record!
is there some way to get the code to ignore the fact the "Time_on_List"
field when assessing whether a record's dirty or not?