I need to store the date a record was created, automatically.

S

Stefan Hoffmann

hi,

I need to store the date and time a record was created, automatically.
This is not possible, but you can store the date and time when a record
is created using the forms Before Insert event:

Private Sub Form_BeforeInsert(Cancel As Integer)

Me![CreatedAt] = Now()

End Sub


mfG
--> stefan <--
 
G

golfinray

Add a field to your table called Last_Updated. Add a textbox to your form.
Make the controlsource Last_Updated. Go to the afterupdate property of the
field you want to record and add:
Me.last_updated=now()
 
Top