Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Time stamp

Posted on 2014-01-10
5
Medium Priority
?
508 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 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

721 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