default value date()

  • Thread starter Thread starter Christina
  • Start date Start date
C

Christina

Hi, if you use the date() function as a default value in a
table, does it automatically update when you open the
table or actually modify a record? Is there a way to have
the creation date as the value, or a modification date
(I'm assuming both of these would require you to actually
edit the record in order for them to change). Thanks in
advance.
 
DefaultValue applies only to the creation of the record, so you cannot use
that to record the modification date. Instead, use the BeforeUpdate event of
the form where edits are made:

Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.[ModificationDate] = Date()
End Sub
 
Back
Top