Auto populate date field just once (on creation) (1 Viewer)

esmith313

New member
Local time
Today, 23:14
Joined
Jul 21, 2015
Messages
4
Hi All,

First hurdle in my database tables, I have a field called Date_Created which I want populated just once, whether from a form or an import.

I have another field called Date_Updated which I want to update any time the record is changed. I know I can do this by using the default value of Now(), but how can I get the Date_Created field just to update when the record is created and not any time after ?

I also want to show these values on the form, but have them as view only, hoping that is possible ?

Suggestions, hints, pointers welcome.

Thanks,
Emma
 

plog

Banishment Pending
Local time
Today, 17:14
Joined
May 11, 2011
Messages
11,669
Add a Default value (=Now()) to the field in Table Design View.
 

esmith313

New member
Local time
Today, 23:14
Joined
Jul 21, 2015
Messages
4
Add a Default value (=Now()) to the field in Table Design View.

Hi, I already did this, but when the record gets updated in the form will this not update at the same time ?

Thanks,
 

plog

Banishment Pending
Local time
Today, 17:14
Joined
May 11, 2011
Messages
11,669
Not by itself it won't. It will only change if you write code to do so or allow users to change it via inputs.
 

Opus

New member
Local time
Today, 23:14
Joined
Jul 22, 2015
Messages
6
You could also use =Date() to show a date only.
 

Users who are viewing this thread

Top Bottom