Timestamp on Form

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

Guest

I want to get a timestamp on a form when data has been input into field 20.
I don't want this stamp to change ever. I want an absolute date & time.
 
A timestamp on the data. When the completed date for serial #000000 is
entered I want a date/timestamp. So in the end I can calculate the
difference between when the date/time recieved & completed
 
You must create a field in your table datatype date for the date you
want to save.

On your form put the locked property of the timestamp textbox to Yes.

Use the AfterUpdate event of the textbox that cares the data of the
field 20 to set the focus to the textbox that shows the timestamp
unlock it and set its value to =Now().
Last lock the timestamp textbox again.
 
I don't want a NOW() formula because it changes with each opening. I want an
absolute date to appear on the form for when the date completed in is
entered. That time stamp would then be stored on the table.
 
OK. For our example here...Text20 is your field 20. Like the others before
said: Create a new field in your table. We will call it FieldA.
Now open the form in design mode.
Create a new Texbox on your form...we will call it Text21 for our purposes.
Set the ControlSource equal to the new table field (FieldA) and the Locked
property of to True.
Now back to Text20...In the AfterUpdate event of Text20:

Private sub Text20_AfterUpdate()
'Check to see if a value already exists,
'if not enter the current system date
If Nz(Text21,"") = "" then
Text21.locked = false
Text21 = Date()
Text21.Locked = true
End If
End Sub

Basically this is what Svetlana was trying to explain to you before.

jmonty
 
Back
Top