By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,669 Members | 2,203 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,669 IT Pros & Developers. It's quick & easy.

Create/Last Modification Date-Time Stamp

P: n/a
I have a database that is shared my multiple users who enter and update
records on a weekly basis. Is there a way I can add a field to my main
data table that will automatically generate the create date or last
modification date for each record?

Nov 27 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
MarcJoseph wrote:
I have a database that is shared my multiple users who enter and update
records on a weekly basis. Is there a way I can add a field to my main
data table that will automatically generate the create date or last
modification date for each record?
If you only want to record the _last_ date of modification beginning
with the date of creation, then you can write a procedure in the
OnDirty event that uses the CurrentUser method and Now() function to
log the name of the user and the date/time of the last modification
right in the form's recordset after a record is updated. However, a
more elegant approach would be to write some DAO code to create a new
record on a separate table every time the record is updated. Again,
this is accomplished from the OnDirty event.

Alexandre Bejerman
Montreal, Canada

Nov 27 '06 #2

P: n/a
Alexandre,

What is an OnDirty event? I'm a MS Access novice.

Thanks.

Marc

ab****@hotmail.com wrote:
MarcJoseph wrote:
I have a database that is shared my multiple users who enter and update
records on a weekly basis. Is there a way I can add a field to my main
data table that will automatically generate the create date or last
modification date for each record?

If you only want to record the _last_ date of modification beginning
with the date of creation, then you can write a procedure in the
OnDirty event that uses the CurrentUser method and Now() function to
log the name of the user and the date/time of the last modification
right in the form's recordset after a record is updated. However, a
more elegant approach would be to write some DAO code to create a new
record on a separate table every time the record is updated. Again,
this is accomplished from the OnDirty event.

Alexandre Bejerman
Montreal, Canada
Nov 27 '06 #3

P: n/a
Marc:

The OnDirty event is an action that is performed whenever a record is
changed on a form. If OnDirty did not exist, you would have to write a
separate event for every bounded control that is modified (or rather,
that modifies a record) in your form.

If you open your form in design view, you can view all possible
associated events in the properties window.

Alex
MarcJoseph wrote:
Alexandre,

What is an OnDirty event? I'm a MS Access novice.

Thanks.

Marc

ab****@hotmail.com wrote:
MarcJoseph wrote:
I have a database that is shared my multiple users who enter and update
records on a weekly basis. Is there a way I can add a field to my main
data table that will automatically generate the create date or last
modification date for each record?
If you only want to record the _last_ date of modification beginning
with the date of creation, then you can write a procedure in the
OnDirty event that uses the CurrentUser method and Now() function to
log the name of the user and the date/time of the last modification
right in the form's recordset after a record is updated. However, a
more elegant approach would be to write some DAO code to create a new
record on a separate table every time the record is updated. Again,
this is accomplished from the OnDirty event.

Alexandre Bejerman
Montreal, Canada
Nov 27 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.