Insert Date/Time Stamp

T

Tony

Hi,

I have a form where a user will update a field labeled status to one of
several options in a drop down list. As soon as the user populates their
appropriate selection, I want a colum in my underlaying table to populate the
current date/time. I dont necessarily care if the date/time is displayed on
my form but want a record of when the selection was made....nothing more.
What are my steps for doing so?? Can anyone help with this?
 
J

J. Goddard

Hi -

The easiest way is to put an (invisible) control on the form, bind it to
to the time stamp field in the table and set the value of the control to
Now(), as in:

Me![Date_Time] = Now()

Best place to put it is in the after update event of the drop-down list.

John
 
B

BruceM

Seems to me that will cause the current date and time to appear in the field
whenever the form is viewed, regardless of whether anything was updated. A
better place to insert a time stamp of a change would be in the After Update
event of the combo box:
Me.DateStampField = Now

J. Goddard said:
Hi -

The easiest way is to put an (invisible) control on the form, bind it to
to the time stamp field in the table and set the value of the control to
Now(), as in:

Me![Date_Time] = Now()

Best place to put it is in the after update event of the drop-down list.

John

Hi, I have a form where a user will update a field labeled status to one
of several options in a drop down list. As soon as the user populates
their appropriate selection, I want a colum in my underlaying table to
populate the current date/time. I dont necessarily care if the date/time
is displayed on my form but want a record of when the selection was
made....nothing more. What are my steps for doing so?? Can anyone help
with this?
 
Top