473,385 Members | 1,317 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Create/Last Modification Date-Time Stamp

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
3 6258
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: a | last post by:
hello all, is there an easy way to get the creation or modification date in a remote server without using ftp_mdtm($url?)? I would like to be able to checkthe date of a...
3
by: stan | last post by:
I am working on some documentation in html format and I would really like to display the date the html file, itself was modified. I am writing my documentation in vi and the html server involved is...
11
by: Dennis Marks | last post by:
There seems to be a major program with the automatic display of the last modified date. Using the javascript "document.lastModified" sometimes returns the correct date and sometimes 1 Jan 1970...
3
by: sparks | last post by:
Have to read in a bunch of files into access and wanted to ask is there a way to read the file modification date before reading them in so I don't read files that I have already read? man thats...
4
by: IdleBrain | last post by:
Hello All, Is it possible to obtain the last Modified date for the source code from within the application? If yes, please let me know how it is done.
1
by: mich dobelman | last post by:
How can i just get the last modification date from the header list. I though I can $request->headers to get the modification date, but without success. <?php include( "Snoopy.class.php" );...
1
by: Shuan | last post by:
snoopy class can retrieve the specific page's lat modification date in String but is there any way to get into the integer or long? <?php include( "Snoopy.class.php" ); $request = new...
4
by: MLH | last post by:
Would like to extract list of database objects in A97 database and each of their last-modified dates. What's the best way to proceed? And, is the last-modified date a property I can read in a...
1
by: myemail.an | last post by:
Hi all, I am a novice to Access, and was wondering if I could get some help on a problem I can't solve. I have a database with customer payments, structured like this: customer code type of...
5
by: perhapscwk | last post by:
How to update stored cookies value without change the cookies expired date? when I login on monday, I have use "remember me for 1 week" to store my login in cookies with my last login...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.