"Date created" field on form

  • Thread starter Thread starter Susan
  • Start date Start date
S

Susan

I want to place a field on a form which automatically
indicates the date on which a new record was
created/input. I want this date to be non-updatable and
unchangeable. I'm assuming there must be a field in the
table for this date, but how is it formatted so that the
date the record is input (saved) is the date that is
shown? Is this even possible?
 
1) Create a Date/Time Field in your table. Call it "AddedOn" or whatever
2) Set "Required" to "Yes" and "DefaultValue" to "Now()"

From this point on whenever a new record is created the current Date/Time
will be automatically inserted into the field. If you already have records
in this table you will have to ignore the error messages you will get when
you save the table the first time. You can fill in the "missing" data
afterwards with an update query if you desire.

To make it non-updateable on the form: add the field to the form and then
set the control's Enabled property to False and/or the Locked property to
True.
 
Great! And thanks for the prompt response!
-----Original Message-----
1) Create a Date/Time Field in your table. Call it "AddedOn" or whatever
2) Set "Required" to "Yes" and "DefaultValue" to "Now()"

From this point on whenever a new record is created the current Date/Time
will be automatically inserted into the field. If you already have records
in this table you will have to ignore the error messages you will get when
you save the table the first time. You can fill in the "missing" data
afterwards with an update query if you desire.

To make it non-updateable on the form: add the field to the form and then
set the control's Enabled property to False and/or the Locked property to
True.

--
George Nicholson

Remove 'Junk' from return address.





.
 
Back
Top