A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Time/Date Stamp for Row Modified



 
 
Thread Tools Display Modes
  #1  
Old December 13th, 2005, 04:26 AM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default Time/Date Stamp for Row Modified

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.
  #2  
Old December 13th, 2005, 05:01 AM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default Time/Date Stamp for Row Modified

On Mon, 12 Dec 2005 20:26:02 -0800, "sm"
wrote:

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]
  #3  
Old December 13th, 2005, 05:43 AM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default Time/Date Stamp for Row Modified

John, Is there no other way to do it through validation rules, input filters,
smart tags, anything?

Thanks for the quick response.
sm

"John Vinson" wrote:

On Mon, 12 Dec 2005 20:26:02 -0800, "sm"
wrote:

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]

  #4  
Old December 13th, 2005, 06:33 AM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default Time/Date Stamp for Row Modified

On Mon, 12 Dec 2005 21:43:02 -0800, "sm"
wrote:

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]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I time/date stamp a read-only section of a Word document? Jan W., Chicago General Discussion 1 October 29th, 2005 04:00 AM
Date/Time stamp of new & modified records Darrell New Users 8 August 12th, 2005 02:19 AM
Date and time stamp a field (not record) when it is modified KB General Discussion 2 May 18th, 2005 06:01 AM
1. time/date stamp as key & 2. total'g, av'g minutes & seconds gcp New Users 2 July 13th, 2004 02:21 AM
time/date stamp Mike_Hiler Worksheet Functions 2 March 17th, 2004 07:39 PM


All times are GMT +1. The time now is 08:38 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.