writing a timestamp to a table?

  • Thread starter Thread starter everymn
  • Start date Start date
E

everymn

Is there not a simple way to do this? The help page for the time date
functions say that they are to be used in calculated controls in
forms. If I set a control in a form to something like =date(), how do
I then get it stored to the table that the form is based on? I'm sure
I could do it in code but it seems like there should be a simpler way
to do it.

Thank You
 
Is there not a simple way to do this? The help page for the time date
functions say that they are to be used in calculated controls in
forms. If I set a control in a form to something like =date(), how do
I then get it stored to the table that the form is based on? I'm sure
I could do it in code but it seems like there should be a simpler way
to do it.


For NEW records you can use the text box's DefaultValue
property. Use =Date() if you only want the date or use
=Now() if you want the date and time.

It is almost always better to set the field's DafaultValue
in the table instead of doing it in a form(s?). This way
the "date created" field is set regardless of how the record
is created,

To set a "last modified" field on a record when it is saved,
use the **form** BeforeUpdate event:
Me.thefieldname = Date ' or Now
 
Back
Top