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  

TimeStamp Field in Access Table?



 
 
Thread Tools Display Modes
  #1  
Old January 29th, 2006, 04:42 PM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default TimeStamp Field in Access Table?

Is it possible to add a date/time field to an Access table that is
automatically updated every time the record is changed? Sorry if this has
been asked before...I tried looking through recent topics and didn't see it.

Dan


  #2  
Old January 29th, 2006, 05:10 PM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default TimeStamp Field in Access Table?

You cannot do this at the table-level in Access.

If your data is edited in a form, you can use the BeforeUpdate event of the
form to assign the value of Now() to the date/time field, e.g.:

Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.[NameOfYourTextBoxHere] = Now()
End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Dan Johnson" wrote in message
...
Is it possible to add a date/time field to an Access table that is
automatically updated every time the record is changed? Sorry if this has
been asked before...I tried looking through recent topics and didn't see
it.



  #3  
Old January 29th, 2006, 08:05 PM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default TimeStamp Field in Access Table?

Thanks Allen.

Do you know off the top of your head if I can use an ADODB.Recordset event
in VB6 to make sure a TimeStamp field is always updated when a record is
changed?

Dan

"Allen Browne" wrote in message
...
You cannot do this at the table-level in Access.

If your data is edited in a form, you can use the BeforeUpdate event of

the
form to assign the value of Now() to the date/time field, e.g.:

Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.[NameOfYourTextBoxHere] = Now()
End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Dan Johnson" wrote in message
...
Is it possible to add a date/time field to an Access table that is
automatically updated every time the record is changed? Sorry if this

has
been asked before...I tried looking through recent topics and didn't see
it.





  #4  
Old January 30th, 2006, 02:23 AM posted to microsoft.public.access.tablesdbdesign
external usenet poster
 
Posts: n/a
Default TimeStamp Field in Access Table?

If you are updating via a recordset, then you can code it so that the
particular date/time field is updated as well.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Dan Johnson" wrote in message
...
Thanks Allen.

Do you know off the top of your head if I can use an ADODB.Recordset event
in VB6 to make sure a TimeStamp field is always updated when a record is
changed?

Dan

"Allen Browne" wrote in message
...
You cannot do this at the table-level in Access.

If your data is edited in a form, you can use the BeforeUpdate event of

the
form to assign the value of Now() to the date/time field, e.g.:

Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.[NameOfYourTextBoxHere] = Now()
End Sub

"Dan Johnson" wrote in message
...
Is it possible to add a date/time field to an Access table that is
automatically updated every time the record is changed? Sorry if this

has
been asked before...I tried looking through recent topics and didn't
see
it.



 




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
Access 2000 -vs- Access 2003? Mark General Discussion 5 November 30th, 2004 06:36 AM
transpose john Using Forms 1 November 24th, 2004 06:16 PM
Here's a shocker Mike Labosh General Discussion 2 October 26th, 2004 05:04 PM
Access XP Compared to Access 2003 Mardene Leahu New Users 1 October 1st, 2004 05:11 AM
Autonumber Ally H. General Discussion 7 August 27th, 2004 04:51 PM


All times are GMT +1. The time now is 01:59 AM.


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