Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to provide a date that a record was last updated?

Status
Not open for further replies.

nakedbamboo

Technical User
Oct 8, 2003
36
US
I would like to include a field or some text or something that would show up on a form that would let the user know when the record was last changed. What would be the best way to go about doing this? How would I include the date of update with the record and what would be the best way to present the date on a form? Thank you for your help.
 
I add 2 fields to the table... EditedBy and EditDate.

On the edit form based on this table, I store the UserID from the hidden SignOn screen in "EditedBy" and store "Date()" in EditDate.

This lets me know the LAST user to make an update, but doesn't provide history of updates.

Jim DeGeorge [wavey]
 
Ok, so now I only want to update the date field if there is a change made to the data in a record, not if the record is just viewed. Is there a command that scans a record to see if it has been changed where I can then place a variable to capture the date? Thanks jdegeorge.
 
I use the "before update" event and set the two fields as recommended above.
Like this:
Me!Dtelstchg = Now()
Me!LastChgdby = pubUserName

pubUserName is the stored user id.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top