Modified Date Field

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

I'm trying to create a field on a form the shows the date.
i would like this date to automatically put the current
date in if any information changes in the entire record -
like a "last modified date".

Can this be done easily?

Thnaks for your help in advance
 
Jason,
I usually use 2 small date fields in the upper left corner of each form.
DOC (DateOfCreation) and DOLE (Date of Last Edit)
Then this code...
Private Sub Form_BeforeUpdate(Cancel As Integer)
If (IsNull(DOC)) Then
DOC = Date
DOLE = Date
Else
DOLE = Date
End If
End Sub

hth
Al Camp
 
does this not change the DOLE entry even if you cycle
through the records and don't actually change anything?
 
No, because cycling through records does not update any fields... hence...
no BeforeUpdate event.
Only when you return to a previous record, and change a value, will DOLE be
updated.
Al Camp
 
Back
Top