Date Stamp a Form

  • Thread starter Thread starter Jerry C.
  • Start date Start date
J

Jerry C.

How do I put a date stamp on a record indicating the last
date anything was added/changed, etc. to the record?
 
Jerry,

Include a field (LastChanged-date datatype) in your table, and include it in
the recordset you are using as your recordsource for the form.

In the forms BeforeUpdate event add a line of code:

Me.LastChanged = Now()

HTH
Dale F.
 
How do I put a date stamp on a record indicating the last
date anything was added/changed, etc. to the record?

You'll need a date/time field in the table, let's call it Timestamp,
and a bit of VBA code in the form's BeforeUpdate event:

Private Sub Form_BeforeUpdate(Cancel as Integer)
<put any form validation code here>
Me!Timestamp = Now ' or Date if you want just date, not date/time
End Sub
 
Back
Top