I am creating a sales tracker for work and I am trying to have it so for each sales form I can have an initial entry date and a modification date. Is there a way to lock the initial entry date so that it won't change after the initial entry and have the modification date change every time information is updated?
Dates - initial and modification
Collapse
X
-
Generally what I do is hook into the before_update event for the form and when the form is updated I set the modification date gets Date().I am creating a sales tracker for work and I am trying to have it so for each sales form I can have an initial entry date and a modification date. Is there a way to lock the initial entry date so that it won't change after the initial entry and have the modification date change every time information is updated? -
In keeping with hype261's suggestion:
Welcome to Bytes!Code:Private Sub Form_BeforeUpdate(Cancel As Integer) If Me.NewRecord Then Me.OriginalEntryDate = Date Else Me.ModificationDate = Date End If End Sub
Linq ;0)>Comment
Comment