Time/Date Stamp for Row Modified

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need a way of including a Time/Date stamp with each record. The Time/Date
would be updated each time the row's data is modified, rather it be via. a
form, an update query, an open view, etc. Can this be accomplished with a
validation function or some other automatic method? Help is necessary.
Thanks in advance.
 
I need a way of including a Time/Date stamp with each record. The Time/Date
would be updated each time the row's data is modified, rather it be via. a
form, an update query, an open view, etc. Can this be accomplished with a
validation function or some other automatic method? Help is necessary.
Thanks in advance.

With the current version of Access... only if you do the update using
a Form. Tables don't have any usable events.

You can store the data in MSDE or SQL Server Express, link to it from
Access, and use Table Triggers to store a timestamp - but in Access,
all you can do is use a Form, and put code in the form's BeforeUpdate
event:

Private Sub Form_BeforeUpdate(Cancel as Integer)
<any record validation code goes here>
<if the record is invalid set Cancel to True>
ELSE
Me!txtTimestamp = Now
End If
End Sub

where txtTimestamp is a textbox bound to the date/time Timestamp
field.

John W. Vinson[MVP]
 
John, Is there no other way to do it through validation rules, input filters,
smart tags, anything?

Thanks for the quick response.
sm
 
John, Is there no other way to do it through validation rules, input filters,
smart tags, anything?

In a JET Table? Not to my knowledge.

In a SQL Server table (which you can use, free - MSDE or SQL Server
Express) you can use table triggers, but they're not yet available in
Access.

John W. Vinson[MVP]
 
Back
Top