Date Stamp a Form

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?
 
D

Dale Fye

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.
 
J

John Vinson

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top