Create Date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I add a Create Date/Time field to a table that will recored the date/time a record is created? This has to be an easy one.
 
Add a field to the table and set its default value to Date() for date only,
or Now() for date and time.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Laura said:
How do I add a Create Date/Time field to a table that will recored the
date/time a record is created? This has to be an easy one.
 
As long as data entry will only take place via forms, yes, it is. Add the
following code to the bound form's BeforeInsert event:

Me.CreateDate = Now

Of course, your field, CreateDate, must have an associated bound control on
the form for this to work.

--

--
Brian Kastel


--Original Message----------------

How do I add a Create Date/Time field to a table that will recored the
date/time a record is created? This has to be an easy one.
 
Even Better! Thanks.

--
Brian Kastel


--Original Message----------------

Add a field to the table and set its default value to Date() for date only,
or Now() for date and time.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Laura said:
How do I add a Create Date/Time field to a table that will recored the
date/time a record is created? This has to be an easy one.
 
I was assuming that date() and now() would change the date everytime the table was modified, versus the date staying as it was when the record was created

----- Douglas J. Steele wrote: ----

Add a field to the table and set its default value to Date() for date only
or Now() for date and time

--
Doug Steele, Microsoft Access MV
http://I.Am/DougSteel
(no e-mails, please!


Laura said:
How do I add a Create Date/Time field to a table that will recored th
date/time a record is created? This has to be an easy one
 
"Default value" means give the field the value if it doesn't have one. If
the field has a value already, it won't be changed.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Laura said:
I was assuming that date() and now() would change the date everytime the
table was modified, versus the date staying as it was when the record was
created.
 
Back
Top