How do I get =Now() into the field as records???

  • Thread starter Thread starter Joe M
  • Start date Start date
J

Joe M

Hi, I am trying to create a field in a table that automatically gets the
current system time when the record is enter. I have code =Now() on the
form, but it wouldn't save into the Field of the table. How do I get it to
save into the field???
 
Hi Joe

Bind the table field to a textbox on your form (the textbox does not have to
be visible). Then set the DefaultValue property of the textbox to =Now().
 
Hi, I am trying to create a field in a table that automatically gets the
current system time when the record is enter. I have code =Now() on the
form, but it wouldn't save into the Field of the table. How do I get it to
save into the field???

If you set the control source of a textbox to =Now(), it will just
*display* the value, not store it.

Instead, set the control source of the textbox to the name of the
field where you want the time stored, and set its Default property to
Now(). The field will be loaded with the current time at the moment
you first "dirty" the record by entering data into some other field.

John W. Vinson[MVP]
(no longer chatting for now)
 
Back
Top