Time Stamp on form per record ?

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

I'd like to populate a field on screen (datasheet like appearance)
with the date/time as I add each record.

I tried [after update] with =now() and also [before update] but I
still got a blank field. What do I need to do?

thanks,
 
is the form control bound to a field in the form's underlying table? also,
please post the code you tried in the form's BeforeUpdate event.

hth
 
If you use the form's BeforeInsert event, the date will populate as soon as
someone types something into the form. Make sure that the timestamp field's
Locked property is set to yes to prevent the user from modifying it
manually.

Me.AddTimeStamp = Now()

If you want to update that field or a different field each time the record
is updated, you will need to use the form's BeforeUpdate event.

The "Before" events fire before data is saved whereas the "after" events
fire after data is saved so you NEVER would use an "after" event to update a
record. You ALWAYS use the "before" events.

I actually always use the BeforeUpdate event because it isn't important that
the user actually see the timestamp populate. In fact, I almost never even
show the timestamp except for special purposes.
 
Back
Top