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

creation and update times

P: n/a
Hi all,
I am trying to add 4 fields to an existing table which will show record
creation date and time and record update date and time. I have managed to do
the creation date and time ok by adding a default value to the fields on the
form of =Now(). My problem begins when I try to get the updated field filled
in automatically. I just can't think how to do it.

Many thanks in advance for any suggestions

Mark
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Following on from my previous post. I have come up with the idea to add a
default value of Now() to the updated fields. Then set a rule to every other
field so that after update, run a query which updates the fields to Now().
My new problem is that I don't now how to set the criteria on the update
query so it only updates the current record!!!

Is this the right way to go? Is there a better/easier way to achieve this?

Mark

P.S. I know absolutely nothing about VB!!!!!
"Mark" <ma*********@ntlworld.com> wrote in message
news:A3**********************@newsfep2-win.server.ntli.net...
Hi all,
I am trying to add 4 fields to an existing table which will show record creation date and time and record update date and time. I have managed to do the creation date and time ok by adding a default value to the fields on the form of =Now(). My problem begins when I try to get the updated field filled in automatically. I just can't think how to do it.

Many thanks in advance for any suggestions

Mark

Nov 12 '05 #2

P: n/a
Attach a procedure to the form's before update event like this. Must
be before otherwise it will cascade.

me![fieldName] = now()

By the way you only need 2 fields if you are using now(). If you need
the date use date(fieldName), if you need the time use
time(fieldName).

neil
Nov 12 '05 #3

P: n/a
Sorry, it should be format([fieldname],"short date") &
format([fieldname],"short time") .

Neil
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.