Solved

Time stamp

Posted on 2014-01-10
5
475 Views
Last Modified: 2014-01-10
After I enter or change a field on a form, I would like the exact date and time to be stamped onto another field. The field that I want to be stamped with the time is titled: TimeStampTalked

I am guessing there is code I put in the "After Update" event for the field? Thanks!
0
Comment
Question by:cansevin
  • 2
  • 2
5 Comments
 
LVL 119

Expert Comment

by:Rey Obrero
ID: 39772215
yes, you can do that but check these alternative ways

http://support.microsoft.com/kb/197592/en-us

http://allenbrowne.com/AppAudit.html
0
 

Author Comment

by:cansevin
ID: 39772266
Wow... that looks confusing. To clarify... Field1 is where data is entered. Field2 is a time stamp of when the data was entered.

1.) Worst case, I would want a time stamp the first time data is entered in Field1. Then if Field1 is changed, it would stay the original stime stamp.

2.) Best case... everytime Field1 is changed, Field2 would update the latest date/time. The old data and time stamp would be erased and the new one would be there.

Is that possible with limited knowledge of Access?

THanks!
0
 
LVL 119

Accepted Solution

by:
Rey Obrero earned 500 total points
ID: 39772284
2.) Best case.

use the afterupdate event of field1 to update field2
in a nut shell

private sub field1_afterupdate()

me.field2=Now()

end sub
0
 
LVL 84
ID: 39772339
I would want a time stamp the first time data is entered in Field1. Then if Field1 is changed, it would stay the original stime stamp.
You can do this by setting the Default value of your "TimeStamp" field to Now() in Table Design. This will stamp all new records with the current date/time.

Rey has shown you how to do this using the Form events, but be aware that if you make changes via other methods, like in a query or through VBA, those Form Events won't fire.

Access 2010 also includes Data Macros, which  you can use for things like this, and which will fire regardless of how the data changes. I realize you're using 2007, but might be worthwhile to upgrade ...
0
 

Author Closing Comment

by:cansevin
ID: 39772403
Thanks!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now