Need 'date added' column populated

  • Thread starter Thread starter David
  • Start date Start date
D

David

I have a subform which is used to add or update records.
The table it updates has a 'created date' column. I need
to populate this column with the data/time the record gets
added. But I dont want this column updated when the record
is updated so I cant just make it a bound column. How to
do this? The column is not displayed on the form but I
could make it a hidden control if needed.
- David
 
David said:
I have a subform which is used to add or update records.
The table it updates has a 'created date' column. I need
to populate this column with the data/time the record gets
added. But I dont want this column updated when the record
is updated so I cant just make it a bound column. How to
do this? The column is not displayed on the form but I
could make it a hidden control if needed.
- David

Try this:

In design view of the table, set the default value for the field
'Created Date" to Date(). Now every time a record is created, the date
is entered - no coding , no fuss, no worries about record updates.


FYI - spaces should be avoided in object names (ie fields, controls,
queries, forms, reports, etc). It is better (easier) to use
'CreatedDate' rather than 'Created Date' especially if you have to do
any coding.

HTH

Steve
 
Back
Top