ADDING A TIMESTAMP

  • Thread starter Thread starter JustNkase
  • Start date Start date
J

JustNkase

what im looking for is the ability to be able to hit enter
in a memo field and when I hit enter it inserts a
timestamp. Is this possible ? if so next I would like to
be able to convert the time based on a selection of either
MT ( Mountain Time ) EST , PT & CT that will convert the
timestamp /


Any assistance would be great if I can accomplish the
first request that would be awesome
 
Perhaps putting code on the AfterUpdate event of the Textbox (bound to the
memo field):

Private Sub TextBoxName_AfterUpdate()
If Len(Me.TextBoxName.Value & "") = 0 Then _
Me.TextBoxName.Value = Time()
End Sub

To adjust the time to a specific timezone, you'll need code that gets a
choice from user and then stores that choice somewhere so that code can use
it to adjust the current time. But it may be interesting to use because Time
returns time based on PC clock, which may be in different time zone than
you?
 
Ken ,

Thanks for the info , not sure if this will work though.In
this memo we key in log entries for calls that we may be
on . I need to have the ability to time step when
required. i.e.

8:40 called user
9:20 user called back

so when I hit enter or click a button it will insert the
system time stamp.

Your help is appreciated.
 
So you may already have data in the textbox when you press the enter key?
What is the result when the enter key is pressed -- does the focus stay in
the textbox or move to the next control?
 
This is a post I put up for a similar question a while back. You might
think of changing your form to work more like this...

----------------------------------------------------------------------------
------


I would lock that memo field and add a new UNBOUND field on my form called
"ADDNOTE" The user would type text here to add to the existing note.

In the unbound field's 'on exit' property, I'd create code similar to the
following...

Private Sub AddNote_Exit(Cancel As Integer)
If Not AddNote= "" Then
MemoField = MemoField & CurrentUser & " " & date & " " & Time() & "
" &AddNote
AddNote= ""
End If
End Sub


----------------------------------------------------------------------------
------


This code applies a full timestamp. You may want to modify it to suit your
needs. You may also want to include a carriage return in the statement to
separate each entry.

Rick B




what im looking for is the ability to be able to hit enter
in a memo field and when I hit enter it inserts a
timestamp. Is this possible ? if so next I would like to
be able to convert the time based on a selection of either
MT ( Mountain Time ) EST , PT & CT that will convert the
timestamp /


Any assistance would be great if I can accomplish the
first request that would be awesome
 
That would look something like...


Private Sub AddNote_Exit(Cancel As Integer)
If Not AddNote= "" Then
MemoField = MemoField & CurrentUser & " " & date & " " & Time() & "
" & AddNote & Chr(13) & Chr(10)
AddNote= ""
End If
End Sub







This is a post I put up for a similar question a while back. You might
think of changing your form to work more like this...

----------------------------------------------------------------------------
------


I would lock that memo field and add a new UNBOUND field on my form called
"ADDNOTE" The user would type text here to add to the existing note.

In the unbound field's 'on exit' property, I'd create code similar to the
following...

Private Sub AddNote_Exit(Cancel As Integer)
If Not AddNote= "" Then
MemoField = MemoField & CurrentUser & " " & date & " " & Time() & "
" & AddNote
AddNote= ""
End If
End Sub


----------------------------------------------------------------------------
------


This code applies a full timestamp. You may want to modify it to suit your
needs. You may also want to include a carriage return in the statement to
separate each entry.

Rick B




what im looking for is the ability to be able to hit enter
in a memo field and when I hit enter it inserts a
timestamp. Is this possible ? if so next I would like to
be able to convert the time based on a selection of either
MT ( Mountain Time ) EST , PT & CT that will convert the
timestamp /


Any assistance would be great if I can accomplish the
first request that would be awesome
 
Back
Top