date/time stamp

sthapa

Registered User.
Local time
Today, 19:46
Joined
Jun 1, 2004
Messages
27
hi im sharing a database between 5 people and was wondering if there was a way to add a date/time stamp to let me know when someone has added data.
 
Hi,

Go into design view of the table you wish to store the date in, add a field called 'DateAdded' (or something like that) set it to date/time and put the default value of the field to:

Now()


Now everytime a new record is added the date and time will be put in this field.
 
SQL_Hell said:
put the default value of the field to: Now()


If you want to keep track of this stuff then what SQL Hell suggests will only tell you when a record has been added to the database.

If you want to keep track of dates created and updated then have two fields:

DateCreated
LastUpdated

Do with DateCreated as SQL Hell says (with DateAdded - same thing)
With LastUpdate, put something like: Me.LastUpdated = Now() in the BeforeUpdate event of your form(s).
 
Mile-O-Phile said:
If you want to keep track of this stuff then what SQL Hell suggests will only tell you when a record has been added to the database.

If you want to keep track of dates created and updated then have two fields:

DateCreated
LastUpdated

Do with DateCreated as SQL Hell says (with DateAdded - same thing)
With LastUpdate, put something like: Me.LastUpdated = Now() in the BeforeUpdate event of your form(s).


Thanks a lot for the help guys
 

Users who are viewing this thread

Back
Top Bottom