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

date and time stamp a new record 1

Status
Not open for further replies.

mavog

IS-IT--Management
Jun 12, 2003
25
GB
Hi all,
could anyone point me in the right direction. I want to add a time and date stamp 'field?' to a record when the user adds or modifies a record. This should be visible in a form and/or report. Is there something built into access already?
 
Yes, In the table define a field of type DateTime and set the Dafault property to Now().

Then, when the record is created the current system date/time is placed into that field - which will then appear in any control that is bound to it.


'ope-that-'elps.



G LS
accessaceNOJUNK@valleyalley.co.uk
Remove the NOJUNK to use.
 
mavog!

This works when you create a NEW record, However if you change any info in your record it will keep the creation date.

The way to update the date when the record is changed:

In the On Change Event Procedure

You will ask the User if he wants to submit the changes, and you will in the same code update the date field with the current Time by using the Now() Function.
 
thanx zevw,
but the user has come back and wants to keep the date it was entered - don't ask me why they don't want to keep when it was edited?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top