Solved

Time stamp

Posted on 2014-01-10
5
486 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 120

Expert Comment

by:Rey Obrero (Capricorn1)
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 120

Accepted Solution

by:
Rey Obrero (Capricorn1) 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
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…
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…

821 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