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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Auto Insert Date and Time

Status
Not open for further replies.

Zonie32

Technical User
Jan 13, 2004
242
0
0
US
I have a form where I want to add a date/time stamp each time someone goes into it and makes changes to any of the text boxes.

One record could be updated several times a day so I want the date/time to change whenever any of the users update it. I also need to have a textbox that captures the user name as well so we can track who is changing the data and on what date and time.

How can this be accomplished? I have a textbox for =currentuser and that seems to work ok. Not sure on the date/time stamp. Help is appreciated.
 
In the BeforeUpdate event procedure of the form:
Me![TimeStamp control] = Now()

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I would create a table called "audit". with "audit_id"(auto-number) as primary key, "Field_name", "Old_value", "New_value".

Then make an run an "insert" SQL command to the table.

It will give you a nice audit trail.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top