G
Guest
Anyone know how to create a date stamp on a form?
AlCamp said:Randy,
Add two fields to your table for the form.
DOC (short for Date Of Creation) and
DOLE (short for Date Of Last Edit)
In the BeforeUpdate event for the form...
Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull([DOC]) Then
DOC = Now()
Else
DOLE = Now()
End If
End Sub
This will tell you when the record was created, and when it was last edited.
hth
Al Camp
AlCamp said:Randy,
Add two fields to your table for the form.
DOC (short for Date Of Creation) and
DOLE (short for Date Of Last Edit)
In the BeforeUpdate event for the form...
Private Sub Form_BeforeUpdate(Cancel As Integer)
If IsNull([DOC]) Then
DOC = Now()
Else
DOLE = Now()
End If
End Sub
This will tell you when the record was created, and when it was last edited.
hth
Al Camp