By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,654 Members | 1,840 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,654 IT Pros & Developers. It's quick & easy.

The use of timestamps

P: 1
Hi there,

Does anybody know how to use timestamps in Microsof Access?
I want to use it for updating records, without overwriting excisting data. I was told that this is possible but I don't know how...
Oct 6 '07 #1
Share this Question
Share on Google+
2 Replies


missinglinq
Expert 2.5K+
P: 3,532
You can certainly program timestamps in Access, but the statement

I want to use it for updating records, without overwriting excisting data
doesn't really tell explain what you hope to accomplish!

Welcome to TheScripts!

Linq ;0)>
Oct 6 '07 #2

nico5038
Expert 2.5K+
P: 3,072
Juste define a field of the DateTime datatype e.g. named "LastUpdateDate".
In the form udating (or inserting) a row use in the BeforeUpdate event this line:
Expand|Select|Wrap|Line Numbers
  1. Me.LastUpdateDate = Now()
  2.  
Personally I use two fields, one for the date and the other for the username like:
Expand|Select|Wrap|Line Numbers
  1. Me.LastUpdateDate = Now()
  2. Me.LastUpdateDBy = Environ("UserName")
  3.  
Often I also duplicate these two fields to keep track of when a person inserted the row and when a person did the last update.

Nic;o)
Oct 6 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.