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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 |