Solved

Time stamp

Posted on 2014-01-10
5
501 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 85
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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
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…

635 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