Timestamp on form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I would like to create two fields on a form, an "In" and an "Out". When a
user opens the form to enter a record the "In" automatically insert the
current time. If the user need to come back to the record to complete the
information, they will selcet "completed" from a drop down which
automatically changes the status date but I would also like this to insert a
current time in the "Out" field as well. Is this possible?

Thanks!!
 
Sure, To get your in time, put this in the Got Focus event of your form:

Me.In = time()

To get your Out time when completed is selected:
In the After Update event of your Drop Down

If Me.MyDropDown = "Completed" Then
Me.Out = Time()
End If
 
The In is simply a default value for the In field.
The Out is set on the AfterUpdate of the drop down box where they select
"completed".
 
Hi Klatuu,

This worked out great!

Thank you!

Klatuu said:
Sure, To get your in time, put this in the Got Focus event of your form:

Me.In = time()

To get your Out time when completed is selected:
In the After Update event of your Drop Down

If Me.MyDropDown = "Completed" Then
Me.Out = Time()
End If
 
Now that the fields work properly, is there a way to lock them so they cannot
be edited?

Thanks!
 
Back
Top